本文整理汇总了Python中armoryengine.BDM.TheBDM.blockchain方法的典型用法代码示例。如果您正苦于以下问题:Python TheBDM.blockchain方法的具体用法?Python TheBDM.blockchain怎么用?Python TheBDM.blockchain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类armoryengine.BDM.TheBDM
的用法示例。
在下文中一共展示了TheBDM.blockchain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RightNow
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import blockchain [as 别名]
requesting data that will force blocking.
"""
start = RightNow()
TheBDM.setBlocking(False)
TheBDM.setOnlineMode(True)
sleep(2)
print 'Waiting for blockchain loading to finish',
while not TheBDM.getState()==BDM_BLOCKCHAIN_READY:
print '.',
sys.stdout.flush()
sleep(2)
print 'Loading blockchain took %0.1f sec' % (RightNow() - start)
topBlock = TheBDM.getTopBlockHeight()
print '\n\nCurrent Top Block is:', topBlock
TheBDM.blockchain().top().pprint()
################################################################################
if run_LoadBlockchain_Block:
start = RightNow()
TheBDM.setBlocking(True)
TheBDM.setOnlineMode(True)
# The setOnlineMode should block until blockchain loading is complete
print 'Loading blockchain took %0.1f sec' % (RightNow() - start)
topBlock = TheBDM.getTopBlockHeight()
print '\n\nCurrent Top Block is:', topBlock
TheBDM.blockchain().top().pprint()
################################################################################