You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #12296: wallet: Only fee-bump non-conflicted/non-confirmed txes
faca18d feebumper: Use PreconditionChecks to determine bump eligibility (MarcoFalke)
718f05c move more bumpfee prechecks to feebumper::PreconditionChecks (Gregory Sanders)
Pull request description:
This only affects the gui.
Fee-bumping of transactions that are already confirmed or are already conflicted by other transactions should not be offered by the gui.
Tree-SHA512: 4acf8087c69fbe5bd67be0485cdb4055e985bbf84acc420aa786ad31e2dc6c2572baaac1d359af10a6907790f626edca690285d9a46ae5440900ea12624c634f
errors.push_back("Transaction has been mined, or is conflicted with a mined transaction");
66
66
return feebumper::Result::WALLET_ERROR;
67
67
}
68
+
69
+
if (!SignalsOptInRBF(*wtx.tx)) {
70
+
errors.push_back("Transaction is not BIP 125 replaceable");
71
+
return feebumper::Result::WALLET_ERROR;
72
+
}
73
+
74
+
if (wtx.mapValue.count("replaced_by_txid")) {
75
+
errors.push_back(strprintf("Cannot bump transaction %s which was already bumped by transaction %s", wtx.GetHash().ToString(), wtx.mapValue.at("replaced_by_txid")));
76
+
return feebumper::Result::WALLET_ERROR;
77
+
}
78
+
79
+
// check that original tx consists entirely of our inputs
80
+
// if not, we can't bump the fee, because the wallet has no way of knowing the value of the other inputs (thus the fee)
81
+
if (!wallet->IsAllFromMe(*wtx.tx, ISMINE_SPENDABLE)) {
82
+
errors.push_back("Transaction contains inputs that don't belong to this wallet");
errors.push_back("Transaction is not BIP 125 replaceable");
99
-
return Result::WALLET_ERROR;
100
-
}
101
-
102
-
if (wtx.mapValue.count("replaced_by_txid")) {
103
-
errors.push_back(strprintf("Cannot bump transaction %s which was already bumped by transaction %s", txid.ToString(), wtx.mapValue.at("replaced_by_txid")));
104
-
return Result::WALLET_ERROR;
105
-
}
106
-
107
-
// check that original tx consists entirely of our inputs
108
-
// if not, we can't bump the fee, because the wallet has no way of knowing the value of the other inputs (thus the fee)
109
-
if (!wallet->IsAllFromMe(*wtx.tx, ISMINE_SPENDABLE)) {
110
-
errors.push_back("Transaction contains inputs that don't belong to this wallet");
111
-
return Result::WALLET_ERROR;
112
-
}
113
-
114
120
// figure out which output was change
115
121
// if there was no change output or multiple change outputs, fail
0 commit comments