Documentation ¶
Index ¶
- Variables
- type AccountBlockVerifyStat
- type AccountHashH
- type AccountPendingTask
- type AccountVerifier
- func (verifier *AccountVerifier) VerifyDataValidity(block *ledger.AccountBlock, sbHeight uint64, accType uint64) error
- func (verifier *AccountVerifier) VerifyDealTime(block *ledger.AccountBlock) error
- func (verifier *AccountVerifier) VerifyHash(block *ledger.AccountBlock) error
- func (verifier *AccountVerifier) VerifyIsReceivedSucceed(block *ledger.AccountBlock) bool
- func (verifier *AccountVerifier) VerifyNetAb(block *ledger.AccountBlock) error
- func (verifier *AccountVerifier) VerifyNonce(block *ledger.AccountBlock, accountType uint64) error
- func (verifier *AccountVerifier) VerifyP2PDataValidity(block *ledger.AccountBlock) error
- func (verifier *AccountVerifier) VerifyProducerLegality(block *ledger.AccountBlock, accType uint64) error
- func (verifier *AccountVerifier) VerifyReferred(block *ledger.AccountBlock) (VerifyResult, *AccountBlockVerifyStat)
- func (verifier *AccountVerifier) VerifySigature(block *ledger.AccountBlock) error
- func (verifier *AccountVerifier) VerifySnapshotOfReferredBlock(thisBlock *ledger.AccountBlock, referredBlock *ledger.AccountBlock) (VerifyResult, error)
- func (verifier *AccountVerifier) VerifyTimeOut(blockReferSb *ledger.SnapshotBlock) error
- func (verifier *AccountVerifier) VerifyforRPC(block *ledger.AccountBlock) (blocks []*vm_context.VmAccountBlock, err error)
- func (verifier *AccountVerifier) VerifyforVM(block *ledger.AccountBlock) (blocks []*vm_context.VmAccountBlock, err error)
- type BlockState
- type Consensus
- type NetVerifier
- type SnapshotBlockVerifyStat
- type SnapshotPendingTask
- type SnapshotVerifier
- func (self *SnapshotVerifier) VerifyAccountTimeout(addr types.Address, hashH *ledger.HashHeight, snapshotHeight uint64) (*ledger.HashHeight, error)
- func (self *SnapshotVerifier) VerifyNetSb(block *ledger.SnapshotBlock) error
- func (self *SnapshotVerifier) VerifyReferred(block *ledger.SnapshotBlock) *SnapshotBlockVerifyStat
- func (self *SnapshotVerifier) VerifyTimeout(nowHeight uint64, referHeight uint64) bool
- type VerifyResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrVerifyForVmGeneratorFailed = errors.New("generator in verifier failed") ErrVerifyWithVmResultFailed = errors.New("verify with vm result failed") ErrVerifyAccountAddrFailed = errors.New("account address doesn't exist, need receiveTx for more balance first") ErrVerifyHashFailed = errors.New("verify hash failed") ErrVerifySignatureFailed = errors.New("verify signature failed") ErrVerifyNonceFailed = errors.New("check pow nonce failed") ErrVerifySnapshotOfReferredBlockFailed = errors.New("verify snapshotBlock of the referredBlock failed") ErrVerifyPrevBlockFailed = errors.New("verify prevBlock failed, incorrect use of prevHash or fork happened") ErrVerifyRPCBlockPendingState = errors.New("verify referred block failed, pending for something") )
View Source
var TimeOutHeight = uint64(30 * types.SnapshotDayHeight)
Functions ¶
This section is empty.
Types ¶
type AccountBlockVerifyStat ¶
type AccountBlockVerifyStat struct {
// contains filtered or unexported fields
}
func (*AccountBlockVerifyStat) ErrMsg ¶
func (result *AccountBlockVerifyStat) ErrMsg() string
func (*AccountBlockVerifyStat) GetPendingTasks ¶
func (result *AccountBlockVerifyStat) GetPendingTasks() ([]*AccountPendingTask, *SnapshotPendingTask)
func (*AccountBlockVerifyStat) VerifyResult ¶
func (result *AccountBlockVerifyStat) VerifyResult() VerifyResult
type AccountHashH ¶
type AccountVerifier ¶
type AccountVerifier struct {
// contains filtered or unexported fields
}
func NewAccountVerifier ¶
func NewAccountVerifier(chain chain.Chain, consensus Consensus) *AccountVerifier
func (*AccountVerifier) VerifyDataValidity ¶
func (verifier *AccountVerifier) VerifyDataValidity(block *ledger.AccountBlock, sbHeight uint64, accType uint64) error
func (*AccountVerifier) VerifyDealTime ¶ added in v1.2.0
func (verifier *AccountVerifier) VerifyDealTime(block *ledger.AccountBlock) error
don't accept which timestamp doesn't satisfy within the (now + 1h) limit
func (*AccountVerifier) VerifyHash ¶
func (verifier *AccountVerifier) VerifyHash(block *ledger.AccountBlock) error
func (*AccountVerifier) VerifyIsReceivedSucceed ¶
func (verifier *AccountVerifier) VerifyIsReceivedSucceed(block *ledger.AccountBlock) bool
func (*AccountVerifier) VerifyNetAb ¶
func (verifier *AccountVerifier) VerifyNetAb(block *ledger.AccountBlock) error
func (*AccountVerifier) VerifyNonce ¶
func (verifier *AccountVerifier) VerifyNonce(block *ledger.AccountBlock, accountType uint64) error
func (*AccountVerifier) VerifyP2PDataValidity ¶
func (verifier *AccountVerifier) VerifyP2PDataValidity(block *ledger.AccountBlock) error
func (*AccountVerifier) VerifyProducerLegality ¶ added in v1.2.0
func (verifier *AccountVerifier) VerifyProducerLegality(block *ledger.AccountBlock, accType uint64) error
func (*AccountVerifier) VerifyReferred ¶
func (verifier *AccountVerifier) VerifyReferred(block *ledger.AccountBlock) (VerifyResult, *AccountBlockVerifyStat)
contractAddr's sendBlock don't call VerifyReferredforPool
func (*AccountVerifier) VerifySigature ¶
func (verifier *AccountVerifier) VerifySigature(block *ledger.AccountBlock) error
func (*AccountVerifier) VerifySnapshotOfReferredBlock ¶
func (verifier *AccountVerifier) VerifySnapshotOfReferredBlock(thisBlock *ledger.AccountBlock, referredBlock *ledger.AccountBlock) (VerifyResult, error)
referredBlock' snapshotBlock's sbHeight can't lower than thisBlock
func (*AccountVerifier) VerifyTimeOut ¶
func (verifier *AccountVerifier) VerifyTimeOut(blockReferSb *ledger.SnapshotBlock) error
func (*AccountVerifier) VerifyforRPC ¶
func (verifier *AccountVerifier) VerifyforRPC(block *ledger.AccountBlock) (blocks []*vm_context.VmAccountBlock, err error)
func (*AccountVerifier) VerifyforVM ¶
func (verifier *AccountVerifier) VerifyforVM(block *ledger.AccountBlock) (blocks []*vm_context.VmAccountBlock, err error)
type BlockState ¶ added in v1.2.0
type BlockState struct {
// contains filtered or unexported fields
}
type Consensus ¶
type Consensus interface {
VerifyAccountProducer(block *ledger.AccountBlock) (bool, error)
}
type NetVerifier ¶
type NetVerifier interface { VerifyNetSb(block *ledger.SnapshotBlock) error VerifyNetAb(block *ledger.AccountBlock) error }
func NewNetVerifier ¶
func NewNetVerifier(sv *SnapshotVerifier, av *AccountVerifier) NetVerifier
type SnapshotBlockVerifyStat ¶
type SnapshotBlockVerifyStat struct {
// contains filtered or unexported fields
}
func (*SnapshotBlockVerifyStat) ErrMsg ¶
func (self *SnapshotBlockVerifyStat) ErrMsg() string
func (*SnapshotBlockVerifyStat) Results ¶
func (self *SnapshotBlockVerifyStat) Results() map[types.Address]VerifyResult
func (*SnapshotBlockVerifyStat) VerifyResult ¶
func (self *SnapshotBlockVerifyStat) VerifyResult() VerifyResult
type SnapshotPendingTask ¶
type SnapshotVerifier ¶
type SnapshotVerifier struct {
// contains filtered or unexported fields
}
func NewSnapshotVerifier ¶
func NewSnapshotVerifier(ch chain.Chain, cs consensus.Verifier) *SnapshotVerifier
func (*SnapshotVerifier) VerifyAccountTimeout ¶
func (self *SnapshotVerifier) VerifyAccountTimeout(addr types.Address, hashH *ledger.HashHeight, snapshotHeight uint64) (*ledger.HashHeight, error)
func (*SnapshotVerifier) VerifyNetSb ¶
func (self *SnapshotVerifier) VerifyNetSb(block *ledger.SnapshotBlock) error
func (*SnapshotVerifier) VerifyReferred ¶
func (self *SnapshotVerifier) VerifyReferred(block *ledger.SnapshotBlock) *SnapshotBlockVerifyStat
func (*SnapshotVerifier) VerifyTimeout ¶
func (self *SnapshotVerifier) VerifyTimeout(nowHeight uint64, referHeight uint64) bool
Click to show internal directories.
Click to hide internal directories.