Skip to content

Commit faabc26

Browse files
author
MarcoFalke
committed
test: Replace getmempoolentry with testmempoolaccept in MiniWallet
1 parent 42675e7 commit faabc26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/functional/test_framework/wallet.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def send_self_transfer(self, *, fee_rate=Decimal("0.003"), from_node, utxo_to_sp
7171
tx.wit.vtxinwit[0].scriptWitness.stack = [CScript([OP_TRUE])]
7272
tx_hex = tx.serialize().hex()
7373

74-
txid = from_node.sendrawtransaction(tx_hex)
75-
self._utxos.append({'txid': txid, 'vout': 0, 'value': send_value})
76-
tx_info = from_node.getmempoolentry(txid)
74+
tx_info = from_node.testmempoolaccept([tx_hex])[0]
75+
self._utxos.append({'txid': tx_info['txid'], 'vout': 0, 'value': send_value})
76+
from_node.sendrawtransaction(tx_hex)
7777
assert_equal(tx_info['vsize'], vsize)
78-
assert_equal(tx_info['fee'], fee)
79-
return {'txid': txid, 'wtxid': tx_info['wtxid'], 'hex': tx_hex}
78+
assert_equal(tx_info['fees']['base'], fee)
79+
return {'txid': tx_info['txid'], 'wtxid': from_node.decoderawtransaction(tx_hex)['hash'], 'hex': tx_hex}

0 commit comments

Comments
 (0)