lnd.xprv/discovery
Johan T. Halseth a55c74f80c
discovery/gossiper: restrict database access per channel ID
This commit uses the multimutex.Mutex to esure database
state stays consistent when handling an announcement, by
restricting access to one goroutine per channel ID.

This fixes a bug where the goroutine would read the
database, make some decisions based on what was read,
then write its data to the database, but the read data
would be outdated at this point. For instance, an
AuthProof could have been added between reading the
database and when the decision whether to announce
the channel is made, making it not announce it.
Similarly, when receiving the AuthProof, the edge
policy could be added between reading the edge state
and adding the proof to the database, also resulting
in the edge not being announced.
2018-01-24 10:26:40 +01:00
..
ann_validation.go discovery: publicly export announcement validation related functions 2017-12-01 19:31:54 -08:00
bootstrapper.go discovery: correctly format ipv6 addresses from dns seed 2017-12-22 20:12:35 +01:00
gossiper_test.go discovery test: update gossiper test to account for timestamp deduping 2018-01-09 13:09:28 +01:00
gossiper.go discovery/gossiper: restrict database access per channel ID 2018-01-24 10:26:40 +01:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
utils.go discovery: set proper flag within createChanAnnouncement 2017-11-30 22:33:00 -08:00