Documentation
¶
Index ¶
- type DPoS
- func (d *DPoS) ActiveProducers() []string
- func (d *DPoS) CurrentProducer() string
- func (d *DPoS) FetchBlock(id common.BlockID) (common.ISignedBlock, error)
- func (d *DPoS) FetchBlocksSince(id common.BlockID) ([]common.ISignedBlock, error)
- func (d *DPoS) GetHeadBlockId() common.BlockID
- func (d *DPoS) GetIDs(start, end common.BlockID) ([]common.BlockID, error)
- func (d *DPoS) HasBlock(id common.BlockID) bool
- func (d *DPoS) PushBlock(b common.ISignedBlock)
- func (d *DPoS) PushTransaction(trx common.ISignedTransaction, wait bool, broadcast bool) common.ITransactionInvoice
- func (d *DPoS) SetBootstrap(b bool)
- func (d *DPoS) Start(node *node.Node) error
- func (d *DPoS) Stop() error
- type IProducer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DPoS ¶
type DPoS struct {
iservices.IConsensus
ForkDB *forkdb.DB
Producers []string
Name string
sync.RWMutex
// contains filtered or unexported fields
}
func NewDPoS ¶
func NewDPoS(ctx *node.ServiceContext) *DPoS
func (*DPoS) ActiveProducers ¶
func (*DPoS) CurrentProducer ¶
func (*DPoS) FetchBlock ¶
func (*DPoS) FetchBlocksSince ¶
func (*DPoS) GetHeadBlockId ¶
func (*DPoS) PushBlock ¶
func (d *DPoS) PushBlock(b common.ISignedBlock)
func (*DPoS) PushTransaction ¶
func (d *DPoS) PushTransaction(trx common.ISignedTransaction, wait bool, broadcast bool) common.ITransactionInvoice
func (*DPoS) SetBootstrap ¶
type IProducer ¶
type IProducer interface {
Produce() (common.ISignedBlock, error)
}
Click to show internal directories.
Click to hide internal directories.