Documentation ¶
Index ¶
- Constants
- func CreateElectionResultKey(hash types.Hash) []byte
- func CreateElectionResultPrefixKey() []byte
- func CreatePointKey(prefix byte, height uint64) []byte
- type AddrArr
- type ConsensusDB
- func (self *ConsensusDB) Check()
- func (self *ConsensusDB) DeleteElectionResultByHash(hash types.Hash) error
- func (self *ConsensusDB) DeletePointByHeight(prefix byte, height uint64) error
- func (self *ConsensusDB) GetElectionResultByHash(hash types.Hash) ([]types.Address, error)
- func (self *ConsensusDB) GetPointByHeight(prefix byte, height uint64) (*Point, error)
- func (self *ConsensusDB) StoreElectionResultByHash(hash types.Hash, addrArr []types.Address) error
- func (self *ConsensusDB) StorePointByHeight(prefix byte, height uint64, p *Point) error
- type Content
- type Point
- type VoteContent
Constants ¶
View Source
const ( // IndexElectionResult is store prefix for election result IndexElectionResult = byte(0) // IndexPointPeriod is store prefix for period sbp info IndexPointPeriod = byte(1) // IndexPointHour is store prefix for hour sbp info IndexPointHour = byte(2) // IndexPointDay is store prefix for day sbp info IndexPointDay = byte(3) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddrArr ¶
AddrArr is slice of types.Address
type ConsensusDB ¶
type ConsensusDB struct {
// contains filtered or unexported fields
}
ConsensusDB is leveldb for
func NewConsensusDB ¶
func NewConsensusDB(db *leveldb.DB) *ConsensusDB
func (*ConsensusDB) Check ¶
func (self *ConsensusDB) Check()
func (*ConsensusDB) DeleteElectionResultByHash ¶
func (self *ConsensusDB) DeleteElectionResultByHash(hash types.Hash) error
func (*ConsensusDB) DeletePointByHeight ¶
func (self *ConsensusDB) DeletePointByHeight(prefix byte, height uint64) error
func (*ConsensusDB) GetElectionResultByHash ¶
func (*ConsensusDB) GetPointByHeight ¶
func (self *ConsensusDB) GetPointByHeight(prefix byte, height uint64) (*Point, error)
func (*ConsensusDB) StoreElectionResultByHash ¶
type Content ¶
Click to show internal directories.
Click to hide internal directories.