mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-30 16:58:56 +02:00
Merge bitcoin/bitcoin#28944: wallet, rpc: add anti-fee-sniping to send and sendall
aac0b6dd79test: test sendall and send do anti-fee-sniping (ishaanam)20802c7b65wallet, rpc: add anti-fee-sniping to `send` and `sendall` (ishaanam) Pull request description: Currently, `send` and `sendall` don't do anti-fee-sniping because they don't use `CreateTransaction`. This PR adds anti-fee-sniping to these RPCs by calling `DiscourageFeeSniping` from `FinishTransaction` when the user does not specify a locktime. ACKs for top commit: achow101: ACKaac0b6dd79murchandamus: ACKaac0b6dd79glozow: ACKaac0b6dd79Tree-SHA512: d4f1b43b5bda489bdba46b0af60e50bff0de604a35670e6ea6e1de2b539f16b3f68805492f51d6d2078d421b63432ca22a561a5721d1a37686f2e48284e1e646
This commit is contained in:
@@ -144,7 +144,12 @@ class WalletSendTest(BitcoinTestFramework):
|
||||
return
|
||||
|
||||
if locktime:
|
||||
assert_equal(from_wallet.gettransaction(txid=res["txid"], verbose=True)["decoded"]["locktime"], locktime)
|
||||
return res
|
||||
else:
|
||||
if add_to_wallet:
|
||||
decoded_tx = from_wallet.gettransaction(txid=res["txid"], verbose=True)["decoded"]
|
||||
assert_greater_than(decoded_tx["locktime"], from_wallet.getblockcount() - 100)
|
||||
|
||||
if expect_sign:
|
||||
assert_equal(res["complete"], True)
|
||||
|
||||
Reference in New Issue
Block a user