|
6 | 6 | from test_framework.test_framework import BitcoinTestFramework |
7 | 7 | from test_framework.util import ( |
8 | 8 | connect_nodes_bi, |
9 | | - disconnect_nodes, |
10 | 9 | get_auth_cookie, |
11 | 10 | get_datadir_path, |
12 | 11 | rpc_port, |
@@ -615,23 +614,14 @@ def run_test(self): |
615 | 614 | assert(final_decoded["vout"][1]["commitmentnonce_fully_valid"]) |
616 | 615 | assert("value" in final_decoded["vout"][2]) |
617 | 616 | assert("asset" in final_decoded["vout"][2]) |
618 | | - # check that it is accepted in the mempool |
| 617 | + # check that it is accepted in either mempool |
619 | 618 | accepted = sidechain.testmempoolaccept([pegin_signed["hex"]])[0] |
| 619 | + if not accepted["allowed"]: |
| 620 | + raise Exception(accepted["reject-reason"]) |
| 621 | + accepted = sidechain2.testmempoolaccept([pegin_signed["hex"]])[0] |
620 | 622 | if not accepted["allowed"]: |
621 | 623 | raise Exception(accepted["reject-reason"]) |
622 | 624 | print("Blinded transaction looks ok!") # need this print to distinguish failures in for loop |
623 | | - # check if they get mined; since we're trying to mine two double spends, disconnect the nodes |
624 | | - disconnect_nodes(sidechain, 3) |
625 | | - disconnect_nodes(sidechain2, 2) |
626 | | - txid1 = sidechain.sendrawtransaction(pegin_signed1["hex"]) |
627 | | - blocks = sidechain.generate(3) |
628 | | - assert_equal(sidechain.getrawtransaction(txid1, True, blocks[0])["confirmations"], 3) |
629 | | - txid2 = sidechain2.sendrawtransaction(pegin_signed2["hex"]) |
630 | | - blocks = sidechain2.generate(3) |
631 | | - assert_equal(sidechain2.getrawtransaction(txid2, True, blocks[0])["confirmations"], 3) |
632 | | - # reconnect in case we extend the test |
633 | | - connect_nodes_bi(self.nodes, 2, 3) |
634 | | - sidechain.generate(10) |
635 | 625 |
|
636 | 626 | print('Success!') |
637 | 627 |
|
|
0 commit comments