The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/staking/availability/interface.go

28 lines
680 B

package availability
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
staking "github.com/woop-chain/woop/staking/types"
)
// Reader ..
type Reader interface {
ReadValidatorSnapshot(
addr common.Address,
) (*staking.ValidatorSnapshot, error)
}
// RoundHeader is the interface of block.Header for calculating the BallotResult.
type RoundHeader interface {
Number() *big.Int
ShardID() uint32
LastCommitBitmap() []byte
}
// ValidatorState is the interface of state.DB
type ValidatorState interface {
ValidatorWrapper(common.Address, bool, bool) (*staking.ValidatorWrapper, error)
UpdateValidatorWrapper(common.Address, *staking.ValidatorWrapper) error
}