diff options
Diffstat (limited to 'core/dkg-tsig-protocol.go')
-rw-r--r-- | core/dkg-tsig-protocol.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/dkg-tsig-protocol.go b/core/dkg-tsig-protocol.go index 50c3a0b..9a71bea 100644 --- a/core/dkg-tsig-protocol.go +++ b/core/dkg-tsig-protocol.go @@ -555,6 +555,13 @@ func (tc *TSigVerifierCache) UpdateAndGet(round uint64) ( return v, ok, nil } +// Purge the cache and returns if success. +func (tc *TSigVerifierCache) Purge(round uint64) { + tc.lock.Lock() + defer tc.lock.Unlock() + delete(tc.verifier, round) +} + // Update the cache and returns if success. func (tc *TSigVerifierCache) Update(round uint64) (bool, error) { tc.lock.Lock() |