Skip to content

Commit c7c3bc6

Browse files
darosiorwillcl-ark
authored andcommitted
qa: sanity check ConnectBlock now checks all rules
1 parent d69f980 commit c7c3bc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/feature_segwit.py

+6
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ def run_test(self):
595595
assert_equal(self.nodes[1].gettransaction(txid, True)["txid"], txid)
596596
assert_equal(self.nodes[1].listtransactions("*", 1, 0, True)[0]["txid"], txid)
597597

598+
# Make sure that ConnectBlock() fails to connect block 165 if it considers Segwit as inactive.
599+
self.restart_node(0, extra_args=["-testactivationheight=segwit@166"])
600+
assert not self.nodes[0].verifychain(4, 0)
601+
self.nodes[0].assert_debug_log(["ConnectBlock: Consensus::ContextualCheckBlock: unexpected-witness"])
602+
603+
598604
def mine_and_test_listunspent(self, script_list, ismine):
599605
utxo = find_spendable_utxo(self.nodes[0], 50)
600606
tx = CTransaction()

0 commit comments

Comments
 (0)