Documentation ¶
Index ¶
- func Factory(ctx context.Context, config *consensus.Config, privateKey *ecdsa.PrivateKey, ...) (consensus.Consensus, error)
- type Pow
- func (p *Pow) Close() error
- func (p *Pow) Prepare(chain consensus.ChainReader, header *types.Header) error
- func (p *Pow) Seal(chain consensus.ChainReader, block *types.Block, ctx context.Context) (*types.Block, error)
- func (p *Pow) VerifyHeader(chain consensus.ChainReader, header *types.Header, uncle, seal bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pow ¶
type Pow struct {
// contains filtered or unexported fields
}
Pow is a vanilla proof-of-work engine
func (*Pow) Prepare ¶
Prepare initializes the consensus fields of a block header according to the rules of a particular engine. The changes are executed inline.
func (*Pow) VerifyHeader ¶
Click to show internal directories.
Click to hide internal directories.