Documentation ¶
Index ¶
- Constants
- type Protocol
- func (p *Protocol) GetEpochHeight(epochNum uint64) uint64
- func (p *Protocol) GetEpochLastBlockHeight(epochNum uint64) uint64
- func (p *Protocol) GetEpochNum(height uint64) uint64
- func (p *Protocol) GetSubEpochNum(height uint64) uint64
- func (p *Protocol) Handle(context.Context, action.Action, protocol.StateManager) (*action.Receipt, error)
- func (p *Protocol) NumCandidateDelegates() uint64
- func (p *Protocol) NumDelegates() uint64
- func (p *Protocol) NumSubEpochs() uint64
- func (p *Protocol) ReadState(context.Context, protocol.StateManager, []byte, ...[]byte) ([]byte, error)
- func (p *Protocol) Validate(context.Context, action.Action) error
Constants ¶
View Source
const ProtocolID = "rolldpos"
ProtocolID is the identity of this protocol
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol defines an epoch protocol
func NewProtocol ¶
NewProtocol returns a new rolldpos protocol
func (*Protocol) GetEpochHeight ¶
GetEpochHeight returns the start height of an epoch
func (*Protocol) GetEpochLastBlockHeight ¶
GetEpochLastBlockHeight returns the last height of an epoch
func (*Protocol) GetEpochNum ¶
GetEpochNum returns the number of the epoch for a given height
func (*Protocol) GetSubEpochNum ¶
GetSubEpochNum returns the sub epoch number of a block height
func (*Protocol) Handle ¶
func (p *Protocol) Handle(context.Context, action.Action, protocol.StateManager) (*action.Receipt, error)
Handle handles a modification
func (*Protocol) NumCandidateDelegates ¶
NumCandidateDelegates returns the number of delegate candidates for an epoch
func (*Protocol) NumDelegates ¶
NumDelegates returns the number of delegates in an epoch
func (*Protocol) NumSubEpochs ¶
NumSubEpochs returns the number of sub-epochs in an epoch
Click to show internal directories.
Click to hide internal directories.