Documentation
¶
Index ¶
- Constants
- func GetFitestGeneratorSnapshotHash(chain vm_context.Chain, referredSnapshotBlock *ledger.SnapshotBlock) (*types.Hash, error)
- type ConsensusMessage
- type GenResult
- type Generator
- func (gen *Generator) GenerateWithBlock(block *ledger.AccountBlock, signFunc SignFunc) (*GenResult, error)
- func (gen *Generator) GenerateWithMessage(message *IncomingMessage, signFunc SignFunc, powFunc PowFunc) (*GenResult, error)
- func (gen *Generator) GenerateWithOnroad(sendBlock ledger.AccountBlock, consensusMsg *ConsensusMessage, ...) (*GenResult, error)
- type IncomingMessage
- type PowFunc
- type SignFunc
Constants ¶
View Source
const DefaultHeightDifference uint64 = 10
Variables ¶
This section is empty.
Functions ¶
func GetFitestGeneratorSnapshotHash ¶
func GetFitestGeneratorSnapshotHash(chain vm_context.Chain, referredSnapshotBlock *ledger.SnapshotBlock) (*types.Hash, error)
Types ¶
type ConsensusMessage ¶
type GenResult ¶
type GenResult struct { BlockGenList []*vm_context.VmAccountBlock IsRetry bool Err error }
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) GenerateWithBlock ¶
func (*Generator) GenerateWithMessage ¶
func (*Generator) GenerateWithOnroad ¶
func (gen *Generator) GenerateWithOnroad(sendBlock ledger.AccountBlock, consensusMsg *ConsensusMessage, signFunc SignFunc, difficulty *big.Int, powFunc PowFunc) (*GenResult, error)
type IncomingMessage ¶
type IncomingMessage struct { BlockType byte AccountAddress types.Address ToAddress *types.Address FromBlockHash *types.Hash TokenId *types.TokenTypeId Amount *big.Int Fee *big.Int Data []byte Difficulty *big.Int }
func (*IncomingMessage) ToSendBlock ¶
func (im *IncomingMessage) ToSendBlock() (*ledger.AccountBlock, error)
Click to show internal directories.
Click to hide internal directories.