本文整理汇总了Python中armoryengine.BDM.TheBDM.bdv方法的典型用法代码示例。如果您正苦于以下问题:Python TheBDM.bdv方法的具体用法?Python TheBDM.bdv怎么用?Python TheBDM.bdv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类armoryengine.BDM.TheBDM
的用法示例。
在下文中一共展示了TheBDM.bdv方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: stopBitcoind
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import bdv [as 别名]
def stopBitcoind(self):
LOGINFO('Called stopBitcoind')
if self.bitcoind == False:
self.bitcoind = None
return
try:
if not self.isRunningBitcoind():
LOGINFO('...but bitcoind is not running, to be able to stop')
return
from armoryengine.BDM import TheBDM
cookie = TheBDM.getCookie()
TheBDM.bdv().shutdownNode(cookie);
#poll the pid until it's gone, for as long as 2 minutes
total = 0
while self.bitcoind.poll()==None:
time.sleep(0.1)
total += 1
if total > 1200:
LOGERROR("bitcoind failed to shutdown in less than 2 minutes."
" Terminating.")
return
self.bitcoind = None
except Exception as e:
LOGERROR(e)
return
示例2: setup
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import bdv [as 别名]
def setup(self):
rbfList = self.wallet.getRBFTxOutList()
self.rbfDict = {}
#order outputs by parent hash
for utxo in rbfList:
parentHash = utxo.getTxHashStr()
if not parentHash in self.rbfDict:
self.rbfDict[parentHash] = []
utxoList = self.rbfDict[parentHash]
utxoList.append(utxo)
for txhash in self.rbfDict:
#get outpoints for spender tx
entryList = self.rbfDict[txhash]
cppTx = TheBDM.bdv().getTxByHash(txhash)
if cppTx.isInitialized():
pytx = PyTx().unserialize(cppTx.serialize())
else:
continue
for _input in pytx.inputs:
spentHash = _input.outpoint.txHash
#if this tx redeems an output in our list of RBF tx,
#link it to the spendee
if spentHash in self.rbfDict:
spendeeList = self.rbfDict[spentHash]
spendeeList.append([txhash, entryList])
def getRBFDict():
return self.rbfDict
self.root = RBFTreeNode(None, "root", True, getRBFDict)