Created
July 23, 2018 08:57
-
-
Save mjmacleod/4437340f8e75c44fedcd5db540c5a51c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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