mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge #21712: qa: Test default include_mempool value of gettxout
44dab423eb
qa: Test default include_mempool value of gettxout (João Barbosa) Pull request description: With the following diff the functional test would pass. Fix by testing the default value. ```diff --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1142,7 +1142,7 @@ static RPCHelpMan gettxout() uint256 hash(ParseHashV(request.params[0], "txid")); int n = request.params[1].get_int(); COutPoint out(hash, n); - bool fMempool = true; + bool fMempool = false; if (!request.params[2].isNull()) fMempool = request.params[2].get_bool(); ``` ACKs for top commit: MarcoFalke: cr ACK44dab423eb
Tree-SHA512: 14db21b29d6b2c01d1d1278e18a0cf35d6ae566e33e45515d1fe2983dda94ad1ff6065c217601d283f9515cae39b57e981b62ac71ec2002de5359bd8a9e3efa9
This commit is contained in:
commit
8e69370b15
1 changed files with 2 additions and 0 deletions
|
@ -95,6 +95,8 @@ class WalletTest(BitcoinTestFramework):
|
|||
# but invisible if you include mempool
|
||||
txout = self.nodes[0].gettxout(confirmed_txid, confirmed_index, False)
|
||||
assert_equal(txout['value'], 50)
|
||||
txout = self.nodes[0].gettxout(confirmed_txid, confirmed_index) # by default include_mempool=True
|
||||
assert txout is None
|
||||
txout = self.nodes[0].gettxout(confirmed_txid, confirmed_index, True)
|
||||
assert txout is None
|
||||
# new utxo from mempool should be invisible if you exclude mempool
|
||||
|
|
Loading…
Reference in a new issue