mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
gossipd: handle a "push" marker into the gossip_store.
This tells clients to ignore any timestamp_filter and always send this message when it sees it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
2d8e93687d
commit
bb370e66a8
@@ -55,11 +55,12 @@ int main(int argc, char *argv[])
|
||||
struct amount_sat sat;
|
||||
u32 msglen = be32_to_cpu(hdr.len);
|
||||
u8 *msg, *inner;
|
||||
bool deleted;
|
||||
bool deleted, push;
|
||||
|
||||
deleted = (msglen & GOSSIP_STORE_LEN_DELETED_BIT);
|
||||
push = (msglen & GOSSIP_STORE_LEN_PUSH_BIT);
|
||||
|
||||
msglen &= ~GOSSIP_STORE_LEN_DELETED_BIT;
|
||||
msglen &= GOSSIP_STORE_LEN_MASK;
|
||||
msg = tal_arr(NULL, u8, msglen);
|
||||
if (read(fd, msg, msglen) != msglen)
|
||||
errx(1, "%zu: Truncated file?", off);
|
||||
@@ -68,7 +69,9 @@ int main(int argc, char *argv[])
|
||||
!= crc32c(be32_to_cpu(hdr.timestamp), msg, msglen))
|
||||
warnx("Checksum verification failed");
|
||||
|
||||
printf("%zu: %s", off, deleted ? "DELETED " : "");
|
||||
printf("%zu: %s%s", off,
|
||||
deleted ? "DELETED " : "",
|
||||
push ? "PUSH " : "");
|
||||
if (deleted && !print_deleted) {
|
||||
printf("\n");
|
||||
goto end;
|
||||
|
||||
Reference in New Issue
Block a user