Documentation ¶
Overview ¶
Package ballot contains ballot seals for consensus
Index ¶
- Variables
- type ACCEPT
- type ACCEPTFact
- func (fact ACCEPTFact) IsValid([]byte) error
- func (fact ACCEPTFact) MarshalBSON() ([]byte, error)
- func (fact ACCEPTFact) MarshalJSON() ([]byte, error)
- func (fact ACCEPTFact) NewBlock() valuehash.Hash
- func (fact ACCEPTFact) Proposal() valuehash.Hash
- func (fact *ACCEPTFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *ACCEPTFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type ACCEPTFactPackerJSON
- type ACCEPTFactUnpackerBSON
- type ACCEPTFactUnpackerJSON
- type BaseBallotPackerJSON
- type BaseBallotUnpackerBSON
- type BaseBallotUnpackerJSON
- type BaseFact
- type BaseFactPackerJSON
- type BaseFactUnpackerBSON
- type BaseFactUnpackerJSON
- type BaseSeal
- func (sl BaseSeal) ACCEPTVoteproof() base.Voteproof
- func (sl BaseSeal) BaseVoteproof() base.Voteproof
- func (sl BaseSeal) BodyBytes() []byte
- func (sl BaseSeal) FactSign() base.BallotFactSign
- func (sl BaseSeal) IsValid(networkID []byte) error
- func (sl BaseSeal) MarshalBSON() ([]byte, error)
- func (sl BaseSeal) MarshalJSON() ([]byte, error)
- func (sl BaseSeal) MarshalZerologObject(e *zerolog.Event)
- func (sl BaseSeal) RawFact() base.BallotFact
- func (sl *BaseSeal) SignWithFact(n base.Address, priv key.Privatekey, networkID []byte) error
- func (sl BaseSeal) SignedFact() base.SignedBallotFact
- func (sl *BaseSeal) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (sl *BaseSeal) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type INIT
- type INITFact
- func (fact INITFact) IsValid([]byte) error
- func (fact INITFact) MarshalBSON() ([]byte, error)
- func (fact INITFact) MarshalJSON() ([]byte, error)
- func (fact INITFact) PreviousBlock() valuehash.Hash
- func (fact *INITFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *INITFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type INITFactPackerJSON
- type INITFactUnpackerBSON
- type INITFactUnpackerJSON
- type Proposal
- type ProposalFact
- func (fact ProposalFact) IsValid([]byte) error
- func (fact ProposalFact) MarshalBSON() ([]byte, error)
- func (fact ProposalFact) MarshalJSON() ([]byte, error)
- func (fact ProposalFact) Operations() []valuehash.Hash
- func (fact ProposalFact) ProposedAt() time.Time
- func (fact ProposalFact) Proposer() base.Address
- func (fact *ProposalFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *ProposalFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type ProposalFactPackerJSON
- type ProposalFactUnpackerBSON
- type ProposalFactUnpackerJSON
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ACCEPTFactHint = hint.NewHint(base.ACCEPTBallotFactType, "v0.0.1") ACCEPTFactHinter = ACCEPTFact{BaseFact: BaseFact{BaseHinter: hint.NewBaseHinter(ACCEPTFactHint)}} ACCEPTHint = hint.NewHint(base.ACCEPTBallotType, "v0.0.1") ACCEPTHinter = ACCEPT{BaseSeal: BaseSeal{BaseSeal: seal.NewBaseSealWithHint(ACCEPTHint)}} )
View Source
var ( INITFactHint = hint.NewHint(base.INITBallotFactType, "v0.0.1") INITFactHinter = INITFact{BaseFact: BaseFact{BaseHinter: hint.NewBaseHinter(INITFactHint)}} INITHint = hint.NewHint(base.INITBallotType, "v0.0.1") INITHinter = INIT{BaseSeal: BaseSeal{BaseSeal: seal.NewBaseSealWithHint(INITHint)}} )
View Source
var ( ProposalFactHint = hint.NewHint(base.ProposalFactType, "v0.0.1") ProposalFactHinter = ProposalFact{BaseFact: BaseFact{BaseHinter: hint.NewBaseHinter(ProposalFactHint)}} ProposalHint = hint.NewHint(base.ProposalType, "v0.0.1") ProposalHinter = Proposal{BaseSeal: BaseSeal{BaseSeal: seal.NewBaseSealWithHint(ProposalHint)}} )
Functions ¶
This section is empty.
Types ¶
type ACCEPT ¶
type ACCEPT struct {
BaseSeal
}
func (ACCEPT) Fact ¶
func (sl ACCEPT) Fact() base.ACCEPTBallotFact
type ACCEPTFact ¶
type ACCEPTFact struct { BaseFact // contains filtered or unexported fields }
func NewACCEPTFact ¶
func (ACCEPTFact) IsValid ¶
func (fact ACCEPTFact) IsValid([]byte) error
func (ACCEPTFact) MarshalBSON ¶
func (fact ACCEPTFact) MarshalBSON() ([]byte, error)
func (ACCEPTFact) MarshalJSON ¶
func (fact ACCEPTFact) MarshalJSON() ([]byte, error)
func (ACCEPTFact) NewBlock ¶
func (fact ACCEPTFact) NewBlock() valuehash.Hash
func (ACCEPTFact) Proposal ¶
func (fact ACCEPTFact) Proposal() valuehash.Hash
func (*ACCEPTFact) UnpackBSON ¶
func (fact *ACCEPTFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*ACCEPTFact) UnpackJSON ¶
func (fact *ACCEPTFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type ACCEPTFactPackerJSON ¶
type ACCEPTFactUnpackerBSON ¶
type ACCEPTFactUnpackerJSON ¶
type BaseBallotPackerJSON ¶
type BaseBallotUnpackerBSON ¶
type BaseBallotUnpackerJSON ¶
type BaseBallotUnpackerJSON struct { F json.RawMessage `json:"signed_fact"` BB json.RawMessage `json:"base_voteproof"` BA json.RawMessage `json:"accept_voteproof,omitempty"` }
type BaseFact ¶
type BaseFact struct { hint.BaseHinter // contains filtered or unexported fields }
type BaseFactPackerJSON ¶
type BaseFactUnpackerBSON ¶
type BaseFactUnpackerJSON ¶
type BaseSeal ¶
func NewBaseSeal ¶
func (BaseSeal) ACCEPTVoteproof ¶
func (BaseSeal) BaseVoteproof ¶
func (BaseSeal) FactSign ¶
func (sl BaseSeal) FactSign() base.BallotFactSign
func (BaseSeal) MarshalBSON ¶
func (BaseSeal) MarshalJSON ¶
func (BaseSeal) MarshalZerologObject ¶
func (BaseSeal) RawFact ¶
func (sl BaseSeal) RawFact() base.BallotFact
func (*BaseSeal) SignWithFact ¶
func (BaseSeal) SignedFact ¶
func (sl BaseSeal) SignedFact() base.SignedBallotFact
type INIT ¶
type INIT struct {
BaseSeal
}
func (INIT) ACCEPTVoteproof ¶
func (INIT) Fact ¶
func (sl INIT) Fact() base.INITBallotFact
type INITFact ¶
type INITFact struct { BaseFact // contains filtered or unexported fields }
func NewINITFact ¶
func (INITFact) MarshalBSON ¶
func (INITFact) MarshalJSON ¶
func (INITFact) PreviousBlock ¶
func (*INITFact) UnpackBSON ¶
type INITFactPackerJSON ¶
type INITFactUnpackerBSON ¶
type INITFactUnpackerJSON ¶
type Proposal ¶
type Proposal struct {
BaseSeal
}
func NewProposal ¶
func (Proposal) Fact ¶
func (sl Proposal) Fact() base.ProposalFact
type ProposalFact ¶
type ProposalFact struct { BaseFact // contains filtered or unexported fields }
func NewProposalFact ¶
func (ProposalFact) IsValid ¶
func (fact ProposalFact) IsValid([]byte) error
func (ProposalFact) MarshalBSON ¶
func (fact ProposalFact) MarshalBSON() ([]byte, error)
func (ProposalFact) MarshalJSON ¶
func (fact ProposalFact) MarshalJSON() ([]byte, error)
func (ProposalFact) Operations ¶
func (fact ProposalFact) Operations() []valuehash.Hash
func (ProposalFact) ProposedAt ¶
func (fact ProposalFact) ProposedAt() time.Time
func (ProposalFact) Proposer ¶
func (fact ProposalFact) Proposer() base.Address
func (*ProposalFact) UnpackBSON ¶
func (fact *ProposalFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*ProposalFact) UnpackJSON ¶
func (fact *ProposalFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type ProposalFactPackerJSON ¶
Click to show internal directories.
Click to hide internal directories.