mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add RPC test exercising BIP68 (mempool only)
This commit is contained in:
committed by
Alex Morcos
parent
c6c2f0fd78
commit
da6ad5f684
@@ -230,6 +230,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user