Skip to content

Instantly share code, notes, and snippets.

@mjmacleod
Created July 23, 2018 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjmacleod/4437340f8e75c44fedcd5db540c5a51c to your computer and use it in GitHub Desktop.
Save mjmacleod/4437340f8e75c44fedcd5db540c5a51c to your computer and use it in GitHub Desktop.
# Below sample code created in collaboration between Gulden team and multipool.us
# Available under public domain
if pow2_aux1 not in [None, '']:
aux1_bin = binascii.unhexlify(pow2_aux1)
aux1_output = halfnode.CTxOut()
aux1_output.deserialize(cStringIO.StringIO(aux1_bin))
self.vout.append(aux1_output)
if pow2_aux2 not in [None, '']:
aux2_bin = binascii.unhexlify(pow2_aux2)
aux2_output = halfnode.CTxOut()
aux2_output.nValue = struct.unpack('<q',aux2_bin[:8])[0]
if aux2_output.nValue != pow2_subsidy:
log.warning('aux2_output did not match aux2_subsidy! (%s != %s)' % (pow2_subsidy, aux2_output.nValue))
aux2_output.deserialize(cStringIO.StringIO(aux2_bin))
self.vout.append(aux2_output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment