Skip to content

Commit

Permalink
Update functional RBF test to check replaceable flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dexX7 committed May 22, 2018
1 parent 820d31f commit 870bd4c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/functional/feature_rbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ def test_opt_in(self):
tx1a_hex = txToHex(tx1a)
tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)

# This transaction isn't shown as replaceable
assert_equal(self.nodes[0].getmempoolentry(tx1a_txid)['bip125-replaceable'], False)

# Shouldn't be able to double-spend
tx1b = CTransaction()
tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
Expand Down Expand Up @@ -467,7 +470,10 @@ def test_opt_in(self):
tx3a.vout = [CTxOut(int(0.9*COIN), CScript([b'c'])), CTxOut(int(0.9*COIN), CScript([b'd']))]
tx3a_hex = txToHex(tx3a)

self.nodes[0].sendrawtransaction(tx3a_hex, True)
tx3a_txid = self.nodes[0].sendrawtransaction(tx3a_hex, True)

# This transaction is shown as replaceable
assert_equal(self.nodes[0].getmempoolentry(tx3a_txid)['bip125-replaceable'], True)

tx3b = CTransaction()
tx3b.vin = [CTxIn(COutPoint(tx1a_txid, 0), nSequence=0)]
Expand Down

0 comments on commit 870bd4c

Please sign in to comment.