wire: add towire_int() and use it in connectd

Add towire_int() and fromwire_int() functions to "(de)serialize"
"int". This will only work as long as both the caller of towire_int()
and the caller of fromwire_int() use the same in-memory representation
of signed integers and have the same sizeof(int).

Changelog-None
This commit is contained in:
Vasil Dimov
2020-01-12 15:33:59 +01:00
committed by Christian Decker
parent fc75d8a9e6
commit fb7c006187
7 changed files with 24 additions and 8 deletions

View File

@@ -185,6 +185,7 @@ class Type(FieldSet):
'bool',
'amount_sat',
'amount_msat',
'int',
'bigsize',
'varint'
]
@@ -199,6 +200,7 @@ class Type(FieldSet):
'secp256k1_ecdsa_recoverable_signature',
'wirestring',
'double',
'int',
'bigsize',
'varint',
]