本文整理汇总了Python中testlib.blockstack_name_update函数的典型用法代码示例。如果您正苦于以下问题:Python blockstack_name_update函数的具体用法?Python blockstack_name_update怎么用?Python blockstack_name_update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了blockstack_name_update函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey )
testlib.next_block( **kw )
# should fail--can't give a name to yourself
testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[4].privkey )
testlib.next_block( **kw )
# should fail--can't steal a name
testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[0].privkey )
testlib.next_block( **kw )
开发者ID:ChairmanTubeAmp,项目名称:blockstack-server,代码行数:27,代码来源:name_preorder_register_update_transfer_cantsteal.py
示例2: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey )
testlib.next_block( **kw )
consensus_hash = testlib.get_consensus_at( testlib.get_current_block( **kw ), **kw )
# lots of blocks later...
for i in xrange(0, 50):
testlib.next_block( **kw )
# update with stale consensus hash (should fail)
print "\n\nsend update with consensus hash %s\n\n" % consensus_hash
testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[3].privkey, consensus_hash=consensus_hash )
testlib.next_block( **kw )
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:30,代码来源:name_preorder_register_update_notstale.py
示例3: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 1, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
# preorder, register, update, expire (multiple times)
for i in xrange(2, 11):
resp = testlib.blockstack_name_preorder( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_update( "foo.test", ("%02x" % i) * 20, wallets[(i+1)%11].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
if i == 10:
break
testlib.next_block( **kw )
开发者ID:ChairmanTubeAmp,项目名称:blockstack-server,代码行数:35,代码来源:name_preorder_register_update_expire_reregister.py
示例4: do_interleaving
def do_interleaving( name, namerecs, order ):
# order should be a string of "u", "t", and "r"
order = list(order)
for i in xrange(0, len(order)):
op = order[i]
if op == 'r':
# renew
print "\nrenew '%s' with %s\n" % (name, pybitcoin.make_pay_to_address_script( namerecs[name][0].addr ))
resp = testlib.blockstack_name_renew( name, namerecs[name][0].privkey, register_addr=namerecs[name][0].addr )
if 'error' in resp:
print json.dumps( resp, indent=4 )
elif op == 'u':
# update
resp = testlib.blockstack_name_update( name, ("%s%s" % (i, i)) * 20, namerecs[name][0].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
elif op == 't':
# transfer and exchange wallets
print "\ntransfer '%s' from %s to %s" % (name, pybitcoin.make_pay_to_address_script( namerecs[name][0].addr ), pybitcoin.make_pay_to_address_script( namerecs[name][1].addr ))
resp = testlib.blockstack_name_transfer( name, namerecs[name][1].addr, True, namerecs[name][0].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
tmp = namerecs[name][0]
namerecs[name][0] = namerecs[name][1]
namerecs[name][1] = tmp
开发者ID:ChairmanTubeAmp,项目名称:blockstack-server,代码行数:32,代码来源:name_preorder_register_update_transfer_renew_interleaving.py
示例5: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
# update and transfer back and forth a few times
for i in xrange(0, 5):
result = testlib.blockstack_name_update( "foo.test", str(i) * 40, wallets[3 + (i%2)].privkey )
update_hashes.append( str(i) * 40 )
testlib.next_block( **kw )
result = testlib.blockstack_name_transfer( "foo.test", wallets[3 + ((i+1)%2)].addr, True, wallets[3 + (i%2)].privkey )
testlib.next_block( **kw )
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:26,代码来源:name_preorder_register_update_listhistory.py
示例6: scenario
def scenario( wallets, **kw ):
global txids
global consensuses
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.next_block( **kw )
# do a sequence of updates, every other block
for i in xrange( 0, 20 ):
if (i % 2) != 0:
update_hash = ("%02x" % (i)) * 20
resp = testlib.blockstack_name_update( "foo.test", update_hash, wallets[3].privkey )
txids[ update_hash ] = resp['transaction_hash']
consensuses[ update_hash ] = testlib.get_consensus_at( testlib.get_current_block( **kw ), **kw )
testlib.next_block( **kw )
testlib.next_block( **kw )
示例7: scenario
def scenario( wallets, **kw ):
global fail_blocks
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 2, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
# wait for it to expire...
for i in xrange(0, 2 * NAMESPACE_LIFETIME_MULTIPLIER + 1):
testlib.next_block( **kw )
# verify that operations fail
resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
fail_blocks.append( testlib.get_current_block( **kw ) )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
# should fail
resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
fail_blocks.append( testlib.get_current_block( **kw ) )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
# should fail
resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
fail_blocks.append( testlib.get_current_block( **kw ) )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
# should fail
resp = testlib.blockstack_name_revoke( "foo.test", wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
fail_blocks.append( testlib.get_current_block( **kw ))
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:58,代码来源:name_preorder_register_expire_isdead.py
示例8: scenario
def scenario( wallets, **kw ):
global update_block
# make a test namespace
resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 6, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_import( "foo.test", wallets[3].addr, "11" * 20, wallets[1].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
# wait for a bit...
for i in xrange(0, 6):
testlib.next_block( **kw )
resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
# update
resp = testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[3].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
update_block = testlib.get_current_block( **kw )
# expire
for i in xrange(0, 6 * NAMESPACE_LIFETIME_MULTIPLIER):
testlib.next_block( **kw )
# re-register
testlib.blockstack_name_preorder( "foo.test", wallets[7].privkey, wallets[8].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[7].privkey, wallets[8].addr )
testlib.next_block( **kw )
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:58,代码来源:name_import_renew_update_expire_reregister.py
示例9: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 4, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
# preorder, register, update, expire (twice; should fail the second time)
for i in xrange(2, 4):
resp = testlib.blockstack_name_preorder( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr )
if 'error' in resp:
print json.dumps( resp, indent=4 )
if i == 3:
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
testlib.next_block( **kw )
resp = testlib.blockstack_name_update( "foo.test", ("%02x" % i) * 20, wallets[(i+1)%11].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
if i == 3:
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
testlib.next_block( **kw )
resp = testlib.blockstack_name_transfer( "foo.test", wallets[i].addr, True, wallets[(i+1)%11].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
if i == 3:
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
testlib.next_block( **kw )
resp = testlib.blockstack_name_renew( "foo.test", wallets[i].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
if i == 3:
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
if i == 3:
break
testlib.next_block( **kw )
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:57,代码来源:name_preorder_register_update_transfer_renew_expire_reregister_failure.py
示例10: scenario
def scenario( wallets, **kw ):
global snv_block_id_foo, snv_txid_bar, snv_txid_baz, last_consensus
# make a test namespace
resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_import( "foo.test", wallets[3].addr, "11" * 20, wallets[1].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
snv_block_id_foo = testlib.get_current_block()
resp = testlib.blockstack_name_import( "bar.test", wallets[5].addr, "33" * 20, wallets[1].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_import( "baz.test", wallets[6].addr, "33" * 20, wallets[1].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_transfer( "bar.test", wallets[4].addr, True, wallets[5].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
snv_txid_bar = resp['transaction_hash']
testlib.next_block( **kw )
resp = testlib.blockstack_name_update( "baz.test", "22" * 20, wallets[6].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
last_consensus = testlib.get_consensus_at( testlib.get_current_block() )
开发者ID:odinho,项目名称:blockstack-integration-tests,代码行数:56,代码来源:name_import_transfer_update_multi_snv.py
示例11: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey )
testlib.next_block( **kw )
示例12: scenario
def scenario( wallets, **kw ):
global debug
resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.next_block( **kw )
resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.next_block( **kw )
resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[4].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.next_block( **kw )
开发者ID:ChairmanTubeAmp,项目名称:blockstack-server,代码行数:54,代码来源:name_preorder_register_renew_transfer_update.py
示例13: scenario
def scenario( wallets, **kw ):
global debug
resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_revoke( "foo.test", wallets[3].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
# should fail
resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
开发者ID:destenson,项目名称:blockstack--blockstack-server,代码行数:53,代码来源:name_preorder_register_update_revoke.py
示例14: scenario
def scenario( wallets, **kw ):
testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
testlib.next_block( **kw )
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
resp = testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr )
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
# no name operations should work on this name, except register
resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
# try both addresses (should both fail)
resp = testlib.blockstack_name_revoke( "foo.test", wallets[4].privkey, safety_checks=False)
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
resp = testlib.blockstack_name_revoke( "foo.test", wallets[3].privkey, safety_checks=False )
if 'error' in resp:
print json.dumps(resp)
testlib.next_block( **kw )
testlib.expect_snv_fail_at( "foo.test", testlib.get_current_block(**kw))
示例15: scenario
def scenario( wallets, **kw ):
# make a test namespace
resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 6, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_name_import( "foo.test", wallets[3].addr, "11" * 20, wallets[1].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
if debug or 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
# wait for a bit...
for i in xrange(0, 6 * NAMESPACE_LIFETIME_MULTIPLIER - 4):
testlib.next_block( **kw )
resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.next_block( **kw )
# transfer
resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
testlib.next_block( **kw )
# update
resp = testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[4].privkey )
if 'error' in resp:
print json.dumps( resp, indent=4 )
testlib.next_block( **kw )
开发者ID:blockstack,项目名称:blockstack-integration-tests,代码行数:52,代码来源:name_import_renew_transfer_update.py