Created
June 21, 2014 03:14
-
-
Save wozz/4d3ff0a3f4705370a908 to your computer and use it in GitHub Desktop.
txnotify patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/wallet.cpp b/src/wallet.cpp | |
| index 4f7b96e..519a841 100644 | |
| --- a/src/wallet.cpp | |
| +++ b/src/wallet.cpp | |
| @@ -590,6 +590,14 @@ bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& | |
| { | |
| { | |
| LOCK(cs_wallet); | |
| + | |
| + std::string strCmd = GetArg("-txnotify", ""); | |
| + if ( !strCmd.empty()) | |
| + { | |
| + boost::replace_all(strCmd, "%s", tx.GetHash().GetHex()); | |
| + boost::thread t(runCommand, strCmd); // thread runs free | |
| + } | |
| + | |
| bool fExisted = mapWallet.count(hash); | |
| if (fExisted && !fUpdate) return false; | |
| if (fExisted || IsMine(tx) || IsFromMe(tx)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment