mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #13339: wallet: Replace %w by wallet name in -walletnotify script
4e9efac678test: Check wallet name in -walletnotify script (João Barbosa)9a5b5ee81fwallet: Replace %w by wallet name in -walletnotify script (João Barbosa) Pull request description: Fixes #13237. ACKs for top commit: laanwj: ACK4e9efac678Tree-SHA512: 189dd1c785485f2e974d7c12531851b2a977778b3b954aa95efd527322ba3345924cfd587fb9c90b0fa979202af0ab2d90e53d125fe266a36c94f757e4176203
This commit is contained in:
@@ -847,6 +847,14 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
||||
if (!strCmd.empty())
|
||||
{
|
||||
boost::replace_all(strCmd, "%s", wtxIn.GetHash().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);
|
||||
t.detach(); // thread runs free
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user