diff --git a/session/pingpong/consumer_totals_storage.go b/session/pingpong/consumer_totals_storage.go index b890e930c3..a9e7a3c157 100644 --- a/session/pingpong/consumer_totals_storage.go +++ b/session/pingpong/consumer_totals_storage.go @@ -94,6 +94,9 @@ func (cts *ConsumerTotalsStorage) Store(chainID int64, id identity.Identity, her // Get fetches the amount as promised for the given channel. func (cts *ConsumerTotalsStorage) Get(chainID int64, id identity.Identity, hermesID common.Address) (*big.Int, error) { key := cts.makeKey(chainID, id, hermesID) + cts.createLock.Lock() + defer cts.createLock.Unlock() + element, ok := cts.data[key] if !ok { return nil, ErrNotFound