Merge branch 'danger' of github.com:MyHush/hush3 into danger

This commit is contained in:
Duke Leto
2020-09-13 13:28:46 -04:00
4 changed files with 39 additions and 122 deletions

View File

@@ -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;
}