Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 901 Lines • ▼ Show 20 Lines | |||||
#if defined(HAVE_SYSTEM) | #if defined(HAVE_SYSTEM) | ||||
// Notify an external script when a wallet transaction comes in or is | // Notify an external script when a wallet transaction comes in or is | ||||
// updated. | // updated. | ||||
std::string strCmd = gArgs.GetArg("-walletnotify", ""); | std::string strCmd = gArgs.GetArg("-walletnotify", ""); | ||||
if (!strCmd.empty()) { | if (!strCmd.empty()) { | ||||
boost::replace_all(strCmd, "%s", wtxIn.GetId().GetHex()); | boost::replace_all(strCmd, "%s", wtxIn.GetId().GetHex()); | ||||
#ifndef WIN32 | |||||
// Substituting the wallet name isn't currently supported on windows | |||||
// because windows shell escaping has not been implemented yet: | |||||
// https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-537384875 | |||||
// A few ways it could be implemented in the future are described in: | |||||
// https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-461288094 | |||||
boost::replace_all(strCmd, "%w", ShellEscape(GetName())); | |||||
#endif | |||||
std::thread t(runCommand, strCmd); | std::thread t(runCommand, strCmd); | ||||
// Thread runs free. | // Thread runs free. | ||||
t.detach(); | t.detach(); | ||||
} | } | ||||
#endif | #endif | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,983 Lines • Show Last 20 Lines |