erigon-pulse/consensus/bor/genesis_contract.go
milen 1a6b83b82c
borheimdall: add test for span persistence (#8988)
1. Adds an eth/stagedsync/test package which provides a test Harness
object
2. Adds the first automated test to the bor-heimdall stage regarding
span persistence (more to come in subsequent PRs)
3. Fixes a bug in the bor-heimdall stage which was uncovered with the
test - we do not fetch span 0 when we sync straight from blockNum=0
without snapshots
4. Reorganises all mocks to be placed under ./mock sub-package within
their respective packages
2023-12-14 22:50:59 +02:00

15 lines
382 B
Go

package bor
import (
"math/big"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/rlp"
)
//go:generate mockgen -destination=./mock/genesis_contract_mock.go -package=mock . GenesisContract
type GenesisContract interface {
CommitState(event rlp.RawValue, syscall consensus.SystemCall) error
LastStateId(syscall consensus.SystemCall) (*big.Int, error)
}