mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
gossipd: fix of gossip v10 channel removal handling
Node announcement indices should be reinitialized after removing the referenced announcement. Debugging output also corrected. Changelog-None
This commit is contained in:
committed by
Rusty Russell
parent
95ec897ac0
commit
27e5ddc7b7
@@ -501,6 +501,8 @@ static void remove_chan_from_node(struct routing_state *rstate,
|
|||||||
gossip_store_delete(rstate->gs,
|
gossip_store_delete(rstate->gs,
|
||||||
&node->bcast,
|
&node->bcast,
|
||||||
WIRE_NODE_ANNOUNCEMENT);
|
WIRE_NODE_ANNOUNCEMENT);
|
||||||
|
node->rgraph.index = node->bcast.index = 0;
|
||||||
|
node->rgraph.timestamp = node->bcast.timestamp = 0;
|
||||||
} else if (node_announce_predates_channels(node)) {
|
} else if (node_announce_predates_channels(node)) {
|
||||||
/* node announcement predates all channel announcements?
|
/* node announcement predates all channel announcements?
|
||||||
* Move to end (we could, in theory, move to just past next
|
* Move to end (we could, in theory, move to just past next
|
||||||
@@ -1377,7 +1379,7 @@ bool routing_add_channel_update(struct routing_state *rstate,
|
|||||||
} else if (hc->bcast.index != hc->rgraph.index){
|
} else if (hc->bcast.index != hc->rgraph.index){
|
||||||
status_broken("gossip_store rate-limited "
|
status_broken("gossip_store rate-limited "
|
||||||
"channel_update %u replaces %u!",
|
"channel_update %u replaces %u!",
|
||||||
index, hc->bcast.index);
|
index, hc->rgraph.index);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1730,7 +1732,7 @@ bool routing_add_node_announcement(struct routing_state *rstate,
|
|||||||
} else if (node->bcast.index != node->rgraph.index){
|
} else if (node->bcast.index != node->rgraph.index){
|
||||||
status_broken("gossip_store rate-limited "
|
status_broken("gossip_store rate-limited "
|
||||||
"node_announcement %u replaces %u!",
|
"node_announcement %u replaces %u!",
|
||||||
index, node->bcast.index);
|
index, node->rgraph.index);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user