Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPolicePassphrase ¶
func GetPolicePassphrase() string
func SetPolicePassphrase ¶
func SetPolicePassphrase(passphrase string)
Types ¶
type Backend ¶
type Backend interface { GetEleHeaderByNumber(number uint64) *types_elephant.Header GetEleHeadersFromPeer(from uint64, amount int, shardingID uint16, lampNum uint64) ([]*types_elephant.Header, error) SignVerifyResult(data []byte, passphrase string) ([]byte, error) BroadcastPoliceVerify(result *Result) DeliverVerifiedResult(result *Result) }
Backend wraps all methods required for verifying.
type HeaderWithHeight ¶
type HeaderWithHeight struct { ShardingID uint16 LampBase *common.Hash Header *common.Hash BlockNumber uint64 PreviousHeaders []*common.Hash // Hashes of the verified headers from last to this one }
func (*HeaderWithHeight) BlockHash ¶
func (match *HeaderWithHeight) BlockHash() common.Hash
func (*HeaderWithHeight) BlockNum ¶
func (match *HeaderWithHeight) BlockNum() uint64
type Lamp ¶
type Lamp interface { GetValidHeadersByBlockNum(blockNum uint64) map[uint16]*types.VerifiedValid CurrEleSealersBlockNum() rpc.BlockNumber }
Lamp wraps all methods required for verifying.
type Officer ¶
type Officer struct {
// contains filtered or unexported fields
}
officer is the main object which takes care of applying messages to the new state
func (*Officer) IsBusying ¶
func (self *Officer) SetReturnCh(ch chan<- *Result) { self.returnCh = ch }
func (*Officer) SetEtherbase ¶
type Result ¶
type Result struct { Match *HeaderWithHeight // the sharding header's hash matching with the tx root hash fetched from the liaison Sign string }
type Work ¶
type Work struct {
ShardingTxBatch *types_elephant.ShardingTxBatch
}
Work is the officer task that shall be verified
Click to show internal directories.
Click to hide internal directories.