discovery/gossiper: don't reset batch after broadcast
This commit fixes a bug that could cause annoucements to get lost, and resultet in flaky integration tests. After a set of announcements was broadcastet, we would reset (clear) the announcement batch, making any annoucement that was added between the call to Emit() and Reset() to be deleted, without ever being broadcast. We can just remove the Reset() call, as the batch will actually be reset within the call to Emit(), making the previous call only delete those messages we hadn't sent yet.
This commit is contained in:
parent
786ca6cc50
commit
3e01529de4
@ -972,11 +972,6 @@ func (d *AuthenticatedGossiper) networkHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
// If we're able to broadcast the current batch
|
||||
// successfully, then we reset the batch for a new
|
||||
// round of announcements.
|
||||
announcements.Reset()
|
||||
|
||||
// The retransmission timer has ticked which indicates that we
|
||||
// should check if we need to prune or re-broadcast any of our
|
||||
// personal channels. This addresses the case of "zombie" channels and
|
||||
|
Loading…
Reference in New Issue
Block a user