rpc: Return wtxid from testmempoolaccept

This commit is contained in:
MarcoFalke
2021-01-07 16:47:35 +01:00
parent 6af013792f
commit fa0aa87071
7 changed files with 48 additions and 10 deletions

View File

@ -112,8 +112,13 @@ class BIP66Test(BitcoinTestFramework):
# First we show that this tx is valid except for DERSIG by getting it
# rejected from the mempool for exactly that reason.
assert_equal(
[{'txid': spendtx.hash, 'allowed': False, 'reject-reason': 'non-mandatory-script-verify-flag (Non-canonical DER signature)'}],
self.nodes[0].testmempoolaccept(rawtxs=[spendtx.serialize().hex()], maxfeerate=0)
[{
'txid': spendtx.hash,
'wtxid': spendtx.getwtxid(),
'allowed': False,
'reject-reason': 'non-mandatory-script-verify-flag (Non-canonical DER signature)',
}],
self.nodes[0].testmempoolaccept(rawtxs=[spendtx.serialize().hex()], maxfeerate=0),
)
# Now we verify that a block with this transaction is also invalid.