当前位置: 首页>>代码示例>>Python>>正文


Python TheBDM.bdv方法代码示例

本文整理汇总了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
开发者ID:Rudd-O,项目名称:BitcoinArmory,代码行数:31,代码来源:SDM.py

示例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)
开发者ID:Rudd-O,项目名称:BitcoinArmory,代码行数:39,代码来源:TreeViewGUI.py


注:本文中的armoryengine.BDM.TheBDM.bdv方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。