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:
Rusty Russell
2018-03-01 19:52:24 +10:30
committed by Christian Decker
parent 6f14736803
commit 042d5d13f5
7 changed files with 52 additions and 45 deletions

View File

@@ -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)