コード例 #1
0
def getblock_async(workpool, bitcoind_opts, block_hash):
    """
   Get a block's data, given its hash.
   Return a future to the data.
   """

    payload = multiprocess_rpc_marshal("getblock", [None, block_hash])

    log.debug("Get block %s" % block_hash)
    block_future = workpool.apply_async(payload)
    return block_future
コード例 #2
0
def getblock_async( workpool, bitcoind_opts, block_hash ):
   """
   Get a block's data, given its hash.
   Return a future to the data.
   """

   payload = multiprocess_rpc_marshal( "getblock", [None, block_hash] )

   log.debug("Get block %s" % block_hash)
   block_future = workpool.apply_async( payload )
   return block_future 
コード例 #3
0
def getblockhash_async( workpool, bitcoind_opts, block_number, reset=False ):
   """
   Get a block's hash, asynchronously, given its ID
   Return a future to the block hash 
   """
 
   payload = multiprocess_rpc_marshal( "getblockhash", [None, block_number, reset] )

   log.debug("Get block hash for %s" % block_number)
   block_hash_future = workpool.apply_async( payload )
   
   return block_hash_future
コード例 #4
0
def getrawtransaction_async( workpool, bitcoind_opts, tx_hash, verbose ):
   """
   Get a block transaction, asynchronously, using the pool of processes
   to go get it.
   """

   payload = multiprocess_rpc_marshal( "getrawtransaction", [None, tx_hash, verbose] )

   # log.debug("getrawtransaction_async %s" % tx_hash)
   tx_future = workpool.apply_async( payload )

   return tx_future
コード例 #5
0
def getblockhash_async( workpool, bitcoind_opts, block_number, reset=False ):
   """
   Get a block's hash, asynchronously, given its ID
   Return a future to the block hash 
   """
 
   payload = multiprocess_rpc_marshal( "getblockhash", [None, block_number, reset] )

   log.debug("Get block hash for %s" % block_number)
   block_hash_future = workpool.apply_async( payload )
   
   return block_hash_future
コード例 #6
0
def getrawtransaction_async( workpool, bitcoind_opts, tx_hash, verbose ):
   """
   Get a block transaction, asynchronously, using the pool of processes
   to go get it.
   """

   payload = multiprocess_rpc_marshal( "getrawtransaction", [None, tx_hash, verbose] )

   # log.debug("getrawtransaction_async %s" % tx_hash)
   tx_future = workpool.apply_async( payload )

   return tx_future