mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
gossipd: make gossip loading stats accurate.
They didn't count the header sizes when reporting bytes, which is misleading. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
eb4564c3cd
commit
ec50ec6a71
@ -363,7 +363,7 @@ void gossip_store_load(struct routing_state *rstate, struct gossip_store *gs)
|
||||
bad = "Unknown message";
|
||||
goto truncate;
|
||||
}
|
||||
known_good += sizeof(belen) + msglen;
|
||||
known_good += sizeof(belen) + sizeof(becsum) + msglen;
|
||||
gs->count++;
|
||||
tal_free(msg);
|
||||
}
|
||||
|
@ -879,7 +879,7 @@ def test_gossip_store_load(node_factory):
|
||||
|
||||
l1.start()
|
||||
# May preceed the Started msg waited for in 'start'.
|
||||
wait_for(lambda: l1.daemon.is_in_log('gossip_store: Read 1/1/1/0 cannounce/cupdate/nannounce/cdelete from store in 744 bytes'))
|
||||
wait_for(lambda: l1.daemon.is_in_log('gossip_store: Read 1/1/1/0 cannounce/cupdate/nannounce/cdelete from store in 756 bytes'))
|
||||
assert not l1.daemon.is_in_log('gossip_store.*truncating')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user