mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
common/read_peer_msg: remove.
Also means we simplify the handle_gossip_msg() since everyone wants it to use sync_crypto_write(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2488,9 +2488,7 @@ int main(int argc, char *argv[])
|
||||
if (msg) {
|
||||
status_trace("Now dealing with deferred gossip %u",
|
||||
fromwire_peektype(msg));
|
||||
handle_gossip_msg(take(msg), &peer->cs,
|
||||
sync_crypto_write_arg,
|
||||
NULL);
|
||||
handle_gossip_msg(PEER_FD, &peer->cs, take(msg));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2523,9 +2521,7 @@ int main(int argc, char *argv[])
|
||||
* connection comes in. */
|
||||
if (!msg)
|
||||
peer_failed_connection_lost();
|
||||
handle_gossip_msg(msg, &peer->cs,
|
||||
sync_crypto_write_arg,
|
||||
peer);
|
||||
handle_gossip_msg(PEER_FD, &peer->cs, take(msg));
|
||||
} else if (FD_ISSET(PEER_FD, &rfds)) {
|
||||
/* This could take forever, but who cares? */
|
||||
msg = sync_crypto_read(tmpctx, &peer->cs, PEER_FD);
|
||||
|
||||
Reference in New Issue
Block a user