-
Notifications
You must be signed in to change notification settings - Fork 912
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
Direct inject update #4361
Direct inject update #4361
Conversation
This overcomes the internal spam filter on updates, which can be useful if we're actually trying to send through such a node. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: Protocol: always accept channel_updates from errors, even they'd otherwise be rejected as spam. Fixes: ElementsProject#4300
4e7964a
to
c4b8e8e
Compare
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.
Nice cleanup 👍
ACK c4b8e8e
gossipd/gossipd.c
Outdated
@@ -1706,6 +1707,7 @@ static struct io_plan *handle_txout_reply(struct io_conn *conn, | |||
struct amount_sat sat; | |||
bool good; | |||
|
|||
status_debug("handle_txout_reply!"); |
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.
Is this used somewhere? Otherwise it's likely to confuse users.
|
||
switch (fromwire_peektype(goss)) { | ||
case WIRE_CHANNEL_ANNOUNCEMENT: | ||
errmsg = handle_channel_announcement_msg(daemon, NULL, goss); |
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.
Had to verify that this still performs the chain_hash
check, which is good, otherwise we could end up with some botched experiments :-)
Importantly, this is synchronous, so pay will be able to use it reliably. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cut & paste from gossipd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We fix up the test by using pay, instead of sendpay (and making pay log the expected message). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: sendpay no longer extracts updates from errors, the caller should do it from the `raw_message`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `addgossip` allows direct injection of network gossip messages.
c4b8e8e
to
9399fec
Compare
ACK 9399fec |
This makes "pay" inject the update directly, and ensures gossipd doesn't suppress it. This removes some uncleanliness from inside lightningd, too.