Remove -respendnotify option
This commit is contained in:
@@ -92,10 +92,6 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry)
|
||||
BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
|
||||
conflicts.push_back(conflict.GetHex());
|
||||
entry.push_back(Pair("walletconflicts", conflicts));
|
||||
UniValue respends;
|
||||
BOOST_FOREACH(const uint256& respend, wtx.GetConflicts(false))
|
||||
respends.push_back(respend.GetHex());
|
||||
entry.push_back(Pair("respendsobserved", respends));
|
||||
entry.push_back(Pair("time", wtx.GetTxTime()));
|
||||
entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
|
||||
BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
|
||||
@@ -1406,12 +1402,6 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
|
||||
" category of transactions.\n"
|
||||
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
|
||||
" \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"walletconflicts\" : [\n"
|
||||
" \"conflictid\", (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
|
||||
" ],\n"
|
||||
" \"respendsobserved\" : [\n"
|
||||
" \"respendid\", (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
|
||||
" ],\n"
|
||||
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
|
||||
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
|
||||
" for 'send' and 'receive' category of transactions.\n"
|
||||
@@ -1604,12 +1594,6 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
|
||||
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
|
||||
" \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"walletconflicts\" : [\n"
|
||||
" \"conflictid\", (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
|
||||
" ],\n"
|
||||
" \"respendsobserved\" : [\n"
|
||||
" \"respendid\", (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
|
||||
" ],\n"
|
||||
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
|
||||
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
|
||||
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
|
||||
@@ -1694,12 +1678,6 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
|
||||
" \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n"
|
||||
" \"blocktime\" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n"
|
||||
" \"txid\" : \"transactionid\", (string) The transaction id.\n"
|
||||
" \"walletconflicts\" : [\n"
|
||||
" \"conflictid\", (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
|
||||
" ],\n"
|
||||
" \"respendsobserved\" : [\n"
|
||||
" \"respendid\", (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
|
||||
" ],\n"
|
||||
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
|
||||
" \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
|
||||
" \"details\" : [\n"
|
||||
|
||||
@@ -1181,28 +1181,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
|
||||
// Notify UI of new or updated transaction
|
||||
NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
|
||||
|
||||
// Notifications for existing transactions that now have conflicts with this one
|
||||
if (fInsertedNew)
|
||||
{
|
||||
BOOST_FOREACH(const uint256& conflictHash, wtxIn.GetConflicts(false))
|
||||
{
|
||||
CWalletTx& txConflict = mapWallet[conflictHash];
|
||||
NotifyTransactionChanged(this, conflictHash, CT_UPDATED); //Updates UI table
|
||||
if (IsFromMe(txConflict) || IsMine(txConflict))
|
||||
{
|
||||
// external respend notify
|
||||
std::string strCmd = GetArg("-respendnotify", "");
|
||||
if (!strCmd.empty())
|
||||
{
|
||||
NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT); //Throws dialog
|
||||
boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
|
||||
boost::replace_all(strCmd, "%t", conflictHash.GetHex());
|
||||
boost::thread t(runCommand, strCmd); // thread runs free
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// notify an external script when a wallet transaction comes in or is updated
|
||||
std::string strCmd = GetArg("-walletnotify", "");
|
||||
|
||||
@@ -3751,7 +3729,6 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
|
||||
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT));
|
||||
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));
|
||||
strUsage += HelpMessageOpt("-walletnotify=<cmd>", _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)"));
|
||||
strUsage += HelpMessageOpt("-respendnotify=<cmd>", _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)"));
|
||||
strUsage += HelpMessageOpt("-zapwallettxes=<mode>", _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") +
|
||||
" " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user