mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
wire: Correct the short channel id serialization to use 3+3+2
Fixes the `short_channel_id` being serialized as 4 bytes block height, 3 bytes transaction index and 1 byte output number, to use 3+3+2 as the spec says. The reordering in the unit test structs is mainly to be able to still use `eq_upto` for tests.
This commit is contained in:
committed by
Rusty Russell
parent
b8ba8f003c
commit
05e951d748
@@ -158,7 +158,7 @@ struct node_connection *get_connection_by_scid(const struct routing_state *rstat
|
||||
num_conn = tal_count(n->out);
|
||||
for (i = 0; i < num_conn; i++){
|
||||
c = n->out[i];
|
||||
if (structeq(&c->short_channel_id, schanid) &&
|
||||
if (short_channel_id_eq(&c->short_channel_id, schanid) &&
|
||||
(c->flags&0x1) == direction)
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user