Add RPC test exercising BIP68 (mempool only)

This commit is contained in:
Suhas Daftuar
2015-12-08 17:25:28 -05:00
committed by BtcDrak
parent 15ba08c3b5
commit 0d09af77b7
2 changed files with 396 additions and 0 deletions

View File

@@ -231,6 +231,14 @@ def ser_int_vector(l):
r += struct.pack("<i", i)
return r
# Deserialize from a hex string representation (eg from RPC)
def FromHex(obj, hex_string):
obj.deserialize(cStringIO.StringIO(binascii.unhexlify(hex_string)))
return obj
# Convert a binary-serializable object to hex (eg for submission via RPC)
def ToHex(obj):
return binascii.hexlify(obj.serialize()).decode('utf-8')
# Objects that map to bitcoind objects, which can be serialized/deserialized