mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
always require a data key when setting the test wallet
This commit is contained in:
@@ -79,8 +79,6 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
|
||||
# migrate profiles
|
||||
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
|
||||
if 'error' in res:
|
||||
|
||||
@@ -78,8 +78,6 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
|
||||
# migrate profiles
|
||||
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
|
||||
if 'error' in res:
|
||||
|
||||
@@ -81,8 +81,6 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, wallet=wallets[3] )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[0].privkey )
|
||||
|
||||
# migrate profiles
|
||||
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
|
||||
if 'error' in res:
|
||||
|
||||
@@ -50,7 +50,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
@@ -73,7 +73,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
|
||||
balance_before = testlib.blockstack_cli_balance()
|
||||
deposit_info = testlib.blockstack_cli_deposit()
|
||||
|
||||
@@ -49,7 +49,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
for j in xrange(0, 3):
|
||||
resp = testlib.blockstack_cli_register( "foo_%s.test" % j, "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
|
||||
@@ -58,8 +58,9 @@ def scenario( wallets, **kw ):
|
||||
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
|
||||
# NOTE: the wallets used here used to be wallets[2] and wallets[3]; these were changed in rc-0.14.2
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[2].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
@@ -113,7 +114,7 @@ def check( state_engine ):
|
||||
return False
|
||||
|
||||
# owned by the right address
|
||||
owner_address = wallets[3].addr
|
||||
owner_address = wallets[4].addr
|
||||
if name_rec['address'] != owner_address or name_rec['sender'] != virtualchain.make_payment_script(owner_address):
|
||||
print "sender is wrong"
|
||||
print "%s != %s or %s != %s" % (name_rec['address'], owner_address, name_rec['sender'], virtualchain.make_payment_script(owner_address))
|
||||
|
||||
@@ -60,17 +60,17 @@ def scenario( wallets, **kw ):
|
||||
testlib.next_block( **kw )
|
||||
|
||||
# should fail if either are multisig
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' not in wallet:
|
||||
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
|
||||
return False
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' not in wallet:
|
||||
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
|
||||
return False
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' not in wallet:
|
||||
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
|
||||
return False
|
||||
@@ -82,7 +82,7 @@ def scenario( wallets, **kw ):
|
||||
return False
|
||||
|
||||
# should succeed
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' in wallet:
|
||||
print "wallet failure: %s" % wallet['error']
|
||||
return False
|
||||
@@ -92,17 +92,17 @@ def scenario( wallets, **kw ):
|
||||
testlib.next_block(**kw)
|
||||
|
||||
# multisig should now be supported
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' in wallet:
|
||||
print "wallet failure: %s" % wallet['error']
|
||||
return False
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' in wallet:
|
||||
print "wallet failure: %s" % wallet['error']
|
||||
return False
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' in wallet:
|
||||
print "wallet failure: %s" % wallet['error']
|
||||
return False
|
||||
@@ -114,7 +114,7 @@ def scenario( wallets, **kw ):
|
||||
return False
|
||||
|
||||
# should succeed
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, None, exception=False )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, wallets[1].privkey, exception=False )
|
||||
if 'error' in wallet:
|
||||
print "wallet failure: %s" % wallet['error']
|
||||
return False
|
||||
|
||||
@@ -55,7 +55,7 @@ def scenario( wallets, **kw ):
|
||||
zonefile = blockstack_client.zonefile.make_empty_zonefile('foo.test', wallets[4].pubkey_hex, urls=driver_urls)
|
||||
zonefile_txt = blockstack_zones.make_zone_file( zonefile, origin='foo.test', ttl=3600 )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef", zonefile=zonefile_txt, recipient_address=wallets[4].addr )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
@@ -52,7 +52,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
|
||||
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
|
||||
testlib.next_block( **kw )
|
||||
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
|
||||
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
|
||||
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
|
||||
if 'error' in resp:
|
||||
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
|
||||
|
||||
Reference in New Issue
Block a user