node/governor: document usage of mutex (TOB-WORMGUWA-2)

This commit is contained in:
tbjump 2023-05-03 22:57:54 +00:00 committed by tbjump
parent 71a27201c7
commit 9e522ace16
1 changed files with 6 additions and 6 deletions

View File

@ -117,14 +117,14 @@ func (ce *chainEntry) isBigTransfer(value uint64) bool {
}
type ChainGovernor struct {
db db.GovernorDB
db db.GovernorDB // protected by `mutex`
logger *zap.Logger
mutex sync.Mutex
tokens map[tokenKey]*tokenEntry
tokensByCoinGeckoId map[string][]*tokenEntry
chains map[vaa.ChainID]*chainEntry
msgsSeen map[string]bool // Key is hash, payload is consts transferComplete and transferEnqueued.
msgsToPublish []*common.MessagePublication
tokens map[tokenKey]*tokenEntry // protected by `mutex`
tokensByCoinGeckoId map[string][]*tokenEntry // protected by `mutex`
chains map[vaa.ChainID]*chainEntry // protected by `mutex`
msgsSeen map[string]bool // protected by `mutex` // Key is hash, payload is consts transferComplete and transferEnqueued.
msgsToPublish []*common.MessagePublication // protected by `mutex`
dayLengthInMinutes int
coinGeckoQueries []string
env int