Exemplo n.º 1
0
def computeAuxpow(block, target, ok):
    """
  Build an auxpow object (serialised as hex string) that solves
  (ok = True) or doesn't solve (ok = False) the block.
  """

    (tx, header) = auxpow.constructAuxpow(block)
    (header, _) = mineBlock(header, target, ok)
    return auxpow.finishAuxpow(tx, header)
Exemplo n.º 2
0
def computeAuxpow (block, target, ok):
  """
  Build an auxpow object (serialised as hex string) that solves
  (ok = True) or doesn't solve (ok = False) the block.
  """

  (tx, header) = auxpow.constructAuxpow (block)
  (header, _) = mineBlock (header, target, ok)
  return auxpow.finishAuxpow (tx, header)