mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-22 23:34:21 +01:00
gossip: Add an explicit debug message when handing back a peer
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
1757732236
commit
2de7f622cb
@@ -1035,6 +1035,9 @@ static struct io_plan *hand_back_peer(struct io_conn *conn,
|
||||
&rpeer->inner_msg))
|
||||
master_badmsg(WIRE_GOSSIPCTL_HAND_BACK_PEER, msg);
|
||||
|
||||
status_debug("Handing back peer %s to master",
|
||||
type_to_string(msg, struct pubkey, &rpeer->id));
|
||||
|
||||
return io_recv_fd(conn, &rpeer->peer_fd,
|
||||
read_returning_gossipfd, rpeer);
|
||||
}
|
||||
|
||||
@@ -271,8 +271,8 @@ class LightningDTests(BaseLightningDTests):
|
||||
|
||||
assert ret['id'] == l2.info['id']
|
||||
|
||||
l1.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l1.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
return l1, l2
|
||||
|
||||
# Waits until l1 notices funds
|
||||
@@ -1148,8 +1148,8 @@ class LightningDTests(BaseLightningDTests):
|
||||
|
||||
assert ret['id'] == l2.info['id']
|
||||
|
||||
l1.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l1.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
|
||||
self.give_funds(l1, 10**6 + 1000000)
|
||||
self.assertRaises(ValueError, l1.rpc.fundchannel, l2.info['id'], 10**6)
|
||||
@@ -2434,7 +2434,7 @@ class LightningDTests(BaseLightningDTests):
|
||||
|
||||
assert ret['id'] == l3.info['id']
|
||||
|
||||
l3.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l3.daemon.wait_for_log('Handing back peer .* to master')
|
||||
self.fund_channel(l1, l2, 10**6)
|
||||
self.fund_channel(l2, l3, 10**6)
|
||||
|
||||
@@ -2529,14 +2529,14 @@ class LightningDTests(BaseLightningDTests):
|
||||
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port'])
|
||||
assert ret['id'] == l2.info['id']
|
||||
|
||||
l1.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l1.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
|
||||
ret = l2.rpc.connect(l3.info['id'], 'localhost', l3.info['port'])
|
||||
assert ret['id'] == l3.info['id']
|
||||
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l3.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l3.daemon.wait_for_log('Handing back peer .* to master')
|
||||
|
||||
c1 = self.fund_channel(l1, l2, 10**6)
|
||||
c2 = self.fund_channel(l2, l3, 10**6)
|
||||
@@ -2633,14 +2633,14 @@ class LightningDTests(BaseLightningDTests):
|
||||
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port'])
|
||||
assert ret['id'] == l2.info['id']
|
||||
|
||||
l1.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l1.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
|
||||
ret = l2.rpc.connect(l3.info['id'], 'localhost', l3.info['port'])
|
||||
assert ret['id'] == l3.info['id']
|
||||
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l3.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l3.daemon.wait_for_log('Handing back peer .* to master')
|
||||
|
||||
c1 = self.fund_channel(l1, l2, 10**6)
|
||||
c2 = self.fund_channel(l2, l3, 10**6)
|
||||
@@ -4056,8 +4056,8 @@ class LightningDTests(BaseLightningDTests):
|
||||
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port'])
|
||||
assert ret['id'] == l2.info['id']
|
||||
|
||||
l1.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l2.daemon.wait_for_log('WIRE_GOSSIPCTL_HAND_BACK_PEER')
|
||||
l1.daemon.wait_for_log('Handing back peer .* to master')
|
||||
l2.daemon.wait_for_log('Handing back peer .* to master')
|
||||
self.fund_channel(l1, l2, 10**6)
|
||||
|
||||
l1.rpc.close(l2.info['id'])
|
||||
|
||||
Reference in New Issue
Block a user