mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
bitcoin: create new wrapper type bitcoin_blkid, log backward endianness.
It's just a sha256_double, but importantly when we convert it to a string (in type_to_string, which is used in logging) we use bitcoin_blkid_to_hex() so it's reversed as people expect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -18,7 +18,7 @@ type2size = {
|
||||
'struct preimage': 32,
|
||||
'struct pubkey': 33,
|
||||
'struct sha256': 32,
|
||||
'struct sha256_double': 32,
|
||||
'struct bitcoin_blkid': 32,
|
||||
'struct bitcoin_txid': 32,
|
||||
'u64': 8,
|
||||
'u32': 4,
|
||||
@@ -78,7 +78,7 @@ partialtypemap = {
|
||||
'signature': FieldType('secp256k1_ecdsa_signature'),
|
||||
'features': FieldType('u8'),
|
||||
'channel_id': FieldType('struct channel_id'),
|
||||
'chain_hash': FieldType('struct sha256_double'),
|
||||
'chain_hash': FieldType('struct bitcoin_blkid'),
|
||||
'funding_txid': FieldType('struct bitcoin_txid'),
|
||||
'pad': FieldType('pad'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user