cic-custodial/internal/noncestore/noncestore.go
Mohammed Sohail 24c81aaee2
fix(noncestore): return nonce incase of task failure
* Return must complete successfully else a nonce gap could form.
* TODO: add tests for Return
* closes#18
2022-10-26 09:21:47 +00:00

13 lines
375 B
Go

package noncestore
import "context"
// Noncestore represents a persistent distributed noncestore
type Noncestore interface {
Peek(context.Context, string) (uint64, error)
Acquire(context.Context, string) (uint64, error)
Return(context.Context, string) error
SyncNetworkNonce(context.Context, string) (uint64, error)
SetNewAccountNonce(context.Context, string) error
}