Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("key not found")
)
Functions ¶
This section is empty.
Types ¶
type BlockStore ¶
type BlockStore struct {
// contains filtered or unexported fields
}
func NewBlockStore ¶
func NewBlockStore(db KeyValueReaderWriter) *BlockStore
func (*BlockStore) GetLastStoredBlock ¶
func (bs *BlockStore) GetLastStoredBlock(domainID uint8) (*big.Int, error)
GetLastStoredBlock queries the blockstore and returns latest known block
func (*BlockStore) GetStartBlock ¶
func (bs *BlockStore) GetStartBlock(domainID uint8, startBlock *big.Int, latest bool, fresh bool) (*big.Int, error)
GetStartBlock queries the blockstore for the latest known block. If the latest block is greater than configured startBlock, then startBlock is replaced with the block right after the latest known block.
func (*BlockStore) StoreBlock ¶
func (bs *BlockStore) StoreBlock(block *big.Int, domainID uint8) error
StoreBlock stores block number per domainID into blockstore
type KeyValueReader ¶
type KeyValueReaderWriter ¶
type KeyValueReaderWriter interface { KeyValueReader KeyValueWriter }
type KeyValueWriter ¶
type NonceStore ¶
type NonceStore struct {
// contains filtered or unexported fields
}
func NewNonceStore ¶
func NewNonceStore(db KeyValueReaderWriter) *NonceStore
func (*NonceStore) StoreNonce ¶
StoreNonce stores nonce per chainID
Click to show internal directories.
Click to hide internal directories.