mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
short_channel_id: don't use bitfields.
I leave all the now-unnecessary accessors in place to avoid churn, but the use of bitfields has been more pain than help. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
6f14736803
commit
042d5d13f5
@@ -105,12 +105,7 @@ void towire_channel_id(u8 **pptr, const struct channel_id *channel_id)
|
||||
void towire_short_channel_id(u8 **pptr,
|
||||
const struct short_channel_id *short_channel_id)
|
||||
{
|
||||
be32 txnum = cpu_to_be32(short_channel_id->txnum);
|
||||
be32 blocknum = cpu_to_be32(short_channel_id->blocknum);
|
||||
|
||||
towire(pptr, (char *)&blocknum + 1, 3);
|
||||
towire(pptr, (char *)&txnum + 1, 3);
|
||||
towire_u16(pptr, short_channel_id->outnum);
|
||||
towire_u64(pptr, short_channel_id->u64);
|
||||
}
|
||||
|
||||
void towire_sha256(u8 **pptr, const struct sha256 *sha256)
|
||||
|
||||
Reference in New Issue
Block a user