Port -txsend from str4d #37, https://github.com/zcash/zcash/pull/4522
This commit is contained in:
@@ -3950,6 +3950,8 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
|
||||
// Track how many getdata requests our transaction gets
|
||||
mapRequestCount[wtxNew.GetHash()] = 0;
|
||||
|
||||
std::string strCmd = GetArg("-txsend", "");
|
||||
|
||||
if (fBroadcastTransactions)
|
||||
{
|
||||
// Broadcast
|
||||
@@ -3962,6 +3964,12 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
|
||||
}
|
||||
wtxNew.RelayWalletTransaction();
|
||||
}
|
||||
// If we are configured to send transactions via an
|
||||
// external service instead of broadcasting, do that
|
||||
else if (!strCmd.empty()) {
|
||||
boost::replace_all(strCmd, "%s", EncodeHexTx(wtxNew));
|
||||
boost::thread t(runCommand, strCmd); // thread runs free
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user