@@ -939,28 +939,28 @@ CWalletTx* CWallet::AddToWallet(CTransactionRef tx, const CWalletTx::Confirmatio
939939
940940#if HAVE_SYSTEM
941941 // notify an external script when a wallet transaction comes in or is updated
942- std::string strCmd = gArgs .GetArg (" -walletnotify" , " " );
942+ std::string command = gArgs .GetArg (" -walletnotify" , " " );
943943
944- if (!strCmd .empty ())
944+ if (!command .empty ())
945945 {
946- boost::replace_all (strCmd , " %s" , hash.GetHex ());
946+ boost::replace_all (command , " %s" , hash.GetHex ());
947947 if (confirm.status == CWalletTx::Status::CONFIRMED)
948948 {
949- boost::replace_all (strCmd , " %b" , confirm.hashBlock .GetHex ());
950- boost::replace_all (strCmd , " %h" , ToString (confirm.block_height ));
949+ boost::replace_all (command , " %b" , confirm.hashBlock .GetHex ());
950+ boost::replace_all (command , " %h" , ToString (confirm.block_height ));
951951 } else {
952- boost::replace_all (strCmd , " %b" , " unconfirmed" );
953- boost::replace_all (strCmd , " %h" , " -1" );
952+ boost::replace_all (command , " %b" , " unconfirmed" );
953+ boost::replace_all (command , " %h" , " -1" );
954954 }
955955#ifndef WIN32
956956 // Substituting the wallet name isn't currently supported on windows
957957 // because windows shell escaping has not been implemented yet:
958958 // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-537384875
959959 // A few ways it could be implemented in the future are described in:
960960 // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-461288094
961- boost::replace_all (strCmd , " %w" , ShellEscape (GetName ()));
961+ boost::replace_all (command , " %w" , ShellEscape (GetName ()));
962962#endif
963- std::thread t (runCommand, strCmd );
963+ std::thread t (runCommand, command );
964964 t.detach (); // thread runs free
965965 }
966966#endif
0 commit comments