Skip to content

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

Merged
merged 9 commits into from
Sep 12, 2019
Merged

Conversation

rustyrussell
Copy link
Contributor

Various gossip-related cleanups I had lying around and which I needed for my next patches.

We overrode this with travis, but it's not a travis issue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell added this to the 0.7.3 milestone Sep 10, 2019
@@ -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);
Copy link
Collaborator

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 */
Copy link
Collaborator

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒

@niftynei
Copy link
Collaborator

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>
@rustyrussell rustyrussell merged commit f4e7ed1 into ElementsProject:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants