discovery: create deDupedAnnouncements struct in gosspier.go

For Part 1 of Issue #275. Create isolated private struct in
networkHandler goroutine that will de-duplicate
announcements added to the batch. The struct contains maps
for each of channel announcements, channel updates, and
node announcements to keep track of unique announcements.

The struct has a Reset method to reset stored announcements, an
AddMsg(lnwire.Message) method to add a new message to the current
batch, and a Batch method to return the set of de-duplicated
announcements.

Also fix a few minor typos.
This commit is contained in:
Laura Cressman authored and Olaoluwa Osuntokun committed 2017-11-15 16:50:19 -08:00
1 parent 1f95b660b9
commit 39d38da732
7 files changed
+173 -70

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
package lnwire
// ShortChannelID represent the set of data which is needed to retrieve all
// ShortChannelID represents the set of data which is needed to retrieve all
// necessary data to validate the channel existence.
type ShortChannelID struct {
// BlockHeight is the height of the block where funding transaction