-
Notifications
You must be signed in to change notification settings - Fork 952
Gossip cleanups #3044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gossip cleanups #3044
Conversation
We overrode this with travis, but it's not a travis issue. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@@ -711,7 +711,7 @@ bool gossip_store_load(struct routing_state *rstate, struct gossip_store *gs) | |||
goto corrupt; | |||
|
|||
/* If last timestamp is within 24 hours, say we're OK. */ | |||
contents_ok = (last_timestamp >= time_now().ts.tv_sec - 24*3600); | |||
contents_ok = (last_timestamp >= gossip_time_now(rstate).ts.tv_sec - 24*3600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this belong with c5ab892
?
common/utils.h
Outdated
* | ||
* Usefully, you can refer to DEVELOPER-only fields here. */ | ||
#if DEVELOPER | ||
/* Makes ure that nondev is evaluated, and valid */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ure -> sure
* for the entire stream. | ||
*/ | ||
unsigned long compressed_len = tal_bytelen(data) | ||
+ 6 + 5*(tal_bytelen(data) + 16384)/16384; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒
ack e5b5d2b |
We've been slack, but it's going to be important for testing ratelimiting. And it currently has a minor memory leak. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
In particular, the timestamp might be wrong once we start checking that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
There are some more #if DEVELOPER one-liners coming, this makes them clear, but still lets them stand out. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
For memory-usage reasons, struct chan doesn't use a tal destructor, in favor of us calling free_chan in the right places. In DEVELOPER mode, we should check that is the case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
In particular, it does zlib. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
719bac7
to
9989154
Compare
Various gossip-related cleanups I had lying around and which I needed for my next patches.