diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_dup_sameblock.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_dup_sameblock.py index 6ff55fe31..f6e6879af 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_dup_sameblock.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_dup_sameblock.py @@ -44,14 +44,12 @@ def scenario( wallets, **kw ): testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) testlib.next_block( **kw ) - + testlib.blockstack_name_preorder( "foo.test", wallets[4].privkey, wallets[3].addr ) testlib.blockstack_name_preorder( "foo.test", wallets[3].privkey, wallets[2].addr ) - # should be accepted + # at most one of these will be accepted testlib.blockstack_name_register( "foo.test", wallets[4].privkey, wallets[3].addr ) - - # should be rejected testlib.blockstack_name_register( "foo.test", wallets[3].privkey, wallets[2].addr ) testlib.next_block( **kw ) @@ -88,10 +86,14 @@ def check( state_engine ): return False # owned by - if name_rec['address'] != wallets[3].addr or name_rec['sender'] != virtualchain.make_payment_script(wallets[3].addr): + found = False + for i in [2,3]: + if name_rec['address'] == wallets[i].addr or name_rec['sender'] == virtualchain.make_payment_script(wallets[i].addr): + found = True + break + + if not found: print "sender is wrong" - print 'expected {}'.format(wallets[3].addr) - print 'got {}'.format(name_rec['address']) return False return True