Merge #7184: Implement SequenceLocks functions for BIP 68

b043c4b fix sdaftuar's nits again (Alex Morcos)
a51c79b Bug fix to RPC test (Alex Morcos)
da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar)
c6c2f0f Implement SequenceLocks functions (Alex Morcos)
This commit is contained in:
Wladimir J. van der Laan
2016-02-12 17:03:43 +01:00
12 changed files with 695 additions and 49 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