Documentation ¶
Overview ¶
Package block defines Block and it's relatives.
Index ¶
- Variables
- func CompareManifestWithMap(manifest Manifest, bd BlockdataMap) error
- func IsLocalBlockdataItem(u string) bool
- type BaseBlockdataMap
- func (bd BaseBlockdataMap) ACCEPTVoteproof() BlockdataMapItem
- func (bd BaseBlockdataMap) Block() valuehash.Hash
- func (bd BaseBlockdataMap) CreatedAt() time.Time
- func (bd BaseBlockdataMap) Exists(b string) error
- func (bd BaseBlockdataMap) GenerateHash() valuehash.Hash
- func (bd BaseBlockdataMap) Hash() valuehash.Hash
- func (bd BaseBlockdataMap) Height() base.Height
- func (bd BaseBlockdataMap) INITVoteproof() BlockdataMapItem
- func (bd BaseBlockdataMap) IsLocal() bool
- func (bd BaseBlockdataMap) IsReadyToHash() error
- func (bd BaseBlockdataMap) IsValid([]byte) error
- func (bd BaseBlockdataMap) Item(dataType string) (BaseBlockdataMapItem, bool)
- func (bd BaseBlockdataMap) Items() map[string]BaseBlockdataMapItem
- func (bd BaseBlockdataMap) Manifest() BlockdataMapItem
- func (bd BaseBlockdataMap) MarshalBSON() ([]byte, error)
- func (bd BaseBlockdataMap) MarshalJSON() ([]byte, error)
- func (bd BaseBlockdataMap) Operations() BlockdataMapItem
- func (bd BaseBlockdataMap) OperationsTree() BlockdataMapItem
- func (bd BaseBlockdataMap) Proposal() BlockdataMapItem
- func (bd BaseBlockdataMap) SetACCEPTVoteproof(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetBlock(blk valuehash.Hash) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetINITVoteproof(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetItem(item BaseBlockdataMapItem) (BaseBlockdataMap, error)
- func (bd BaseBlockdataMap) SetManifest(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetOperations(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetOperationsTree(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetProposal(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetStates(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetStatesTree(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) SetSuffrageInfo(item BaseBlockdataMapItem) BaseBlockdataMap
- func (bd BaseBlockdataMap) States() BlockdataMapItem
- func (bd BaseBlockdataMap) StatesTree() BlockdataMapItem
- func (bd BaseBlockdataMap) SuffrageInfo() BlockdataMapItem
- func (bd *BaseBlockdataMap) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (bd *BaseBlockdataMap) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- func (bd BaseBlockdataMap) UpdateHash() (BaseBlockdataMap, error)
- func (bd BaseBlockdataMap) Writer() hint.Hint
- type BaseBlockdataMapBSONUnpacker
- type BaseBlockdataMapItem
- func (bd BaseBlockdataMapItem) Bytes() []byte
- func (bd BaseBlockdataMapItem) Checksum() string
- func (bd BaseBlockdataMapItem) Exists(b string) error
- func (bd BaseBlockdataMapItem) IsValid([]byte) error
- func (bd BaseBlockdataMapItem) MarshalBSON() ([]byte, error)
- func (bd BaseBlockdataMapItem) MarshalJSON() ([]byte, error)
- func (bd BaseBlockdataMapItem) SetFile(p string) BaseBlockdataMapItem
- func (bd BaseBlockdataMapItem) SetURL(u string) BaseBlockdataMapItem
- func (bd BaseBlockdataMapItem) Type() string
- func (bd BaseBlockdataMapItem) URL() string
- func (bd BaseBlockdataMapItem) URLBody() string
- func (bd *BaseBlockdataMapItem) UnmarshalBSON(b []byte) error
- func (bd *BaseBlockdataMapItem) UnmarshalJSON(b []byte) error
- type BaseBlockdataMapItemBSONPacker
- type BaseBlockdataMapItemJSONPacker
- type BaseBlockdataMapJSONPacker
- type BaseBlockdataMapJSONUnpacker
- type Block
- type BlockUpdater
- type BlockV0
- func (BlockV0) Bytes() []byte
- func (bm BlockV0) ConsensusInfo() ConsensusInfo
- func (bm BlockV0) Hint() hint.Hint
- func (bm BlockV0) IsValid(networkID []byte) error
- func (bm BlockV0) Manifest() Manifest
- func (bm BlockV0) MarshalBSON() ([]byte, error)
- func (bm BlockV0) MarshalJSON() ([]byte, error)
- func (bm BlockV0) Operations() []operation.Operation
- func (bm BlockV0) OperationsTree() tree.FixedTree
- func (bm BlockV0) SetACCEPTVoteproof(voteproof base.Voteproof) BlockUpdater
- func (bm BlockV0) SetINITVoteproof(voteproof base.Voteproof) BlockUpdater
- func (bm BlockV0) SetManifest(m Manifest) BlockUpdater
- func (bm BlockV0) SetOperations(ops []operation.Operation) BlockUpdater
- func (bm BlockV0) SetOperationsTree(tr tree.FixedTree) BlockUpdater
- func (bm BlockV0) SetProposal(sfs base.SignedBallotFact) BlockUpdater
- func (bm BlockV0) SetStates(sts []state.State) BlockUpdater
- func (bm BlockV0) SetStatesTree(tr tree.FixedTree) BlockUpdater
- func (bm BlockV0) SetSuffrageInfo(sf SuffrageInfo) BlockUpdater
- func (bm BlockV0) States() []state.State
- func (bm BlockV0) StatesTree() tree.FixedTree
- func (bm *BlockV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (bm *BlockV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type BlockV0PackJSON
- type BlockV0UnpackBSON
- type BlockV0UnpackJSON
- type BlockdataMap
- type BlockdataMapItem
- type ConsensusInfo
- type ConsensusInfoV0
- func (bc ConsensusInfoV0) ACCEPTVoteproof() base.Voteproof
- func (bc ConsensusInfoV0) INITVoteproof() base.Voteproof
- func (bc ConsensusInfoV0) IsValid(networkID []byte) error
- func (bc ConsensusInfoV0) MarshalBSON() ([]byte, error)
- func (bc ConsensusInfoV0) MarshalJSON() ([]byte, error)
- func (bc ConsensusInfoV0) Proposal() base.SignedBallotFact
- func (bc ConsensusInfoV0) SuffrageInfo() SuffrageInfo
- func (bc *ConsensusInfoV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (bc *ConsensusInfoV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type ConsensusInfoV0PackJSON
- type ConsensusInfoV0UnpackBSON
- type ConsensusInfoV0UnpackJSON
- type Manifest
- type ManifestV0
- func (bm ManifestV0) ConfirmedAt() time.Time
- func (bm ManifestV0) CreatedAt() time.Time
- func (bm ManifestV0) GenerateHash() valuehash.Hash
- func (bm ManifestV0) Hash() valuehash.Hash
- func (bm ManifestV0) Height() base.Height
- func (bm ManifestV0) IsValid(networkID []byte) error
- func (bm ManifestV0) MarshalBSON() ([]byte, error)
- func (bm ManifestV0) MarshalJSON() ([]byte, error)
- func (bm ManifestV0) MarshalZerologObject(e *zerolog.Event)
- func (bm ManifestV0) OperationsHash() valuehash.Hash
- func (bm ManifestV0) PreviousBlock() valuehash.Hash
- func (bm ManifestV0) Proposal() valuehash.Hash
- func (bm ManifestV0) Round() base.Round
- func (bm ManifestV0) StatesHash() valuehash.Hash
- func (bm *ManifestV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (bm *ManifestV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type ManifestV0PackJSON
- type ManifestV0UnpackBSON
- type ManifestV0UnpackJSON
- type SuffrageInfo
- type SuffrageInfoV0
- func (si SuffrageInfoV0) IsValid([]byte) error
- func (si SuffrageInfoV0) MarshalBSON() ([]byte, error)
- func (si SuffrageInfoV0) MarshalJSON() ([]byte, error)
- func (si SuffrageInfoV0) Nodes() []base.Node
- func (si SuffrageInfoV0) Proposer() base.Address
- func (si *SuffrageInfoV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (si *SuffrageInfoV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type SuffrageInfoV0PackJSON
- type SuffrageInfoV0UnpackBSON
- type SuffrageInfoV0UnpackJSON
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BaseBlockdataMapType = hint.Type("base-blockdatamap") BaseBlockdataMapHint = hint.NewHint(BaseBlockdataMapType, "v0.0.1") BaseBlockdataMapHinter = BaseBlockdataMap{BaseHinter: hint.NewBaseHinter(BaseBlockdataMapHint)} )
View Source
var ( BlockdataManifest = "manifest" BlockdataOperations = "operations" BlockdataOperationsTree = "operations_tree" BlockdataStates = "states" BlockdataStatesTree = "states_tree" BlockdataINITVoteproof = "init_voteproof" BlockdataACCEPTVoteproof = "accept_voteproof" BlockdataSuffrageInfo = "suffrage_info" BlockdataProposal = "proposal" )
View Source
var ( BlockV0Type = hint.Type("block") BlockV0Hint = hint.NewHint(BlockV0Type, "v0.0.1") BlockV0Hinter = BlockV0{BaseHinter: hint.NewBaseHinter(BlockV0Hint)} ManifestV0Type = hint.Type("block-manifest") ManifestV0Hint = hint.NewHint(ManifestV0Type, "v0.0.1") ManifestV0Hinter = ManifestV0{BaseHinter: hint.NewBaseHinter(ManifestV0Hint)} BlockConsensusInfoV0Type = hint.Type("block-consensus-info") BlockConsensusInfoV0Hint = hint.NewHint(BlockConsensusInfoV0Type, "v0.0.1") BlockConsensusInfoV0Hinter = ConsensusInfoV0{BaseHinter: hint.NewBaseHinter(BlockConsensusInfoV0Hint)} SuffrageInfoV0Type = hint.Type("block-suffrage-info") SuffrageInfoV0Hint = hint.NewHint(SuffrageInfoV0Type, "v0.0.1") SuffrageInfoV0Hinter = SuffrageInfoV0{BaseHinter: hint.NewBaseHinter(SuffrageInfoV0Hint)} )
Functions ¶
func CompareManifestWithMap ¶
func CompareManifestWithMap(manifest Manifest, bd BlockdataMap) error
func IsLocalBlockdataItem ¶
Types ¶
type BaseBlockdataMap ¶
type BaseBlockdataMap struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseBlockdataMap ¶
func NewBaseBlockdataMap(writerHint hint.Hint, height base.Height) BaseBlockdataMap
func (BaseBlockdataMap) ACCEPTVoteproof ¶
func (bd BaseBlockdataMap) ACCEPTVoteproof() BlockdataMapItem
func (BaseBlockdataMap) Block ¶
func (bd BaseBlockdataMap) Block() valuehash.Hash
func (BaseBlockdataMap) CreatedAt ¶
func (bd BaseBlockdataMap) CreatedAt() time.Time
func (BaseBlockdataMap) Exists ¶
func (bd BaseBlockdataMap) Exists(b string) error
func (BaseBlockdataMap) GenerateHash ¶
func (bd BaseBlockdataMap) GenerateHash() valuehash.Hash
func (BaseBlockdataMap) Hash ¶
func (bd BaseBlockdataMap) Hash() valuehash.Hash
func (BaseBlockdataMap) Height ¶
func (bd BaseBlockdataMap) Height() base.Height
func (BaseBlockdataMap) INITVoteproof ¶
func (bd BaseBlockdataMap) INITVoteproof() BlockdataMapItem
func (BaseBlockdataMap) IsLocal ¶
func (bd BaseBlockdataMap) IsLocal() bool
func (BaseBlockdataMap) IsReadyToHash ¶
func (bd BaseBlockdataMap) IsReadyToHash() error
func (BaseBlockdataMap) IsValid ¶
func (bd BaseBlockdataMap) IsValid([]byte) error
func (BaseBlockdataMap) Item ¶
func (bd BaseBlockdataMap) Item(dataType string) (BaseBlockdataMapItem, bool)
func (BaseBlockdataMap) Items ¶
func (bd BaseBlockdataMap) Items() map[string]BaseBlockdataMapItem
func (BaseBlockdataMap) Manifest ¶
func (bd BaseBlockdataMap) Manifest() BlockdataMapItem
func (BaseBlockdataMap) MarshalBSON ¶
func (bd BaseBlockdataMap) MarshalBSON() ([]byte, error)
func (BaseBlockdataMap) MarshalJSON ¶
func (bd BaseBlockdataMap) MarshalJSON() ([]byte, error)
func (BaseBlockdataMap) Operations ¶
func (bd BaseBlockdataMap) Operations() BlockdataMapItem
func (BaseBlockdataMap) OperationsTree ¶
func (bd BaseBlockdataMap) OperationsTree() BlockdataMapItem
func (BaseBlockdataMap) Proposal ¶
func (bd BaseBlockdataMap) Proposal() BlockdataMapItem
func (BaseBlockdataMap) SetACCEPTVoteproof ¶
func (bd BaseBlockdataMap) SetACCEPTVoteproof(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetBlock ¶
func (bd BaseBlockdataMap) SetBlock(blk valuehash.Hash) BaseBlockdataMap
func (BaseBlockdataMap) SetINITVoteproof ¶
func (bd BaseBlockdataMap) SetINITVoteproof(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetItem ¶
func (bd BaseBlockdataMap) SetItem(item BaseBlockdataMapItem) (BaseBlockdataMap, error)
func (BaseBlockdataMap) SetManifest ¶
func (bd BaseBlockdataMap) SetManifest(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetOperations ¶
func (bd BaseBlockdataMap) SetOperations(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetOperationsTree ¶
func (bd BaseBlockdataMap) SetOperationsTree(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetProposal ¶
func (bd BaseBlockdataMap) SetProposal(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetStates ¶
func (bd BaseBlockdataMap) SetStates(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetStatesTree ¶
func (bd BaseBlockdataMap) SetStatesTree(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) SetSuffrageInfo ¶
func (bd BaseBlockdataMap) SetSuffrageInfo(item BaseBlockdataMapItem) BaseBlockdataMap
func (BaseBlockdataMap) States ¶
func (bd BaseBlockdataMap) States() BlockdataMapItem
func (BaseBlockdataMap) StatesTree ¶
func (bd BaseBlockdataMap) StatesTree() BlockdataMapItem
func (BaseBlockdataMap) SuffrageInfo ¶
func (bd BaseBlockdataMap) SuffrageInfo() BlockdataMapItem
func (*BaseBlockdataMap) UnpackBSON ¶
func (bd *BaseBlockdataMap) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseBlockdataMap) UnpackJSON ¶
func (bd *BaseBlockdataMap) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseBlockdataMap) UpdateHash ¶
func (bd BaseBlockdataMap) UpdateHash() (BaseBlockdataMap, error)
func (BaseBlockdataMap) Writer ¶
func (bd BaseBlockdataMap) Writer() hint.Hint
type BaseBlockdataMapItem ¶
type BaseBlockdataMapItem struct {
// contains filtered or unexported fields
}
func DecodeBaseBlockdataMapItem ¶
func DecodeBaseBlockdataMapItem(b []byte, enc encoder.Encoder) (BaseBlockdataMapItem, error)
func NewBaseBlockdataMapItem ¶
func NewBaseBlockdataMapItem(dataType string, checksum string, url string) BaseBlockdataMapItem
func (BaseBlockdataMapItem) Bytes ¶
func (bd BaseBlockdataMapItem) Bytes() []byte
func (BaseBlockdataMapItem) Checksum ¶
func (bd BaseBlockdataMapItem) Checksum() string
func (BaseBlockdataMapItem) Exists ¶
func (bd BaseBlockdataMapItem) Exists(b string) error
func (BaseBlockdataMapItem) IsValid ¶
func (bd BaseBlockdataMapItem) IsValid([]byte) error
func (BaseBlockdataMapItem) MarshalBSON ¶
func (bd BaseBlockdataMapItem) MarshalBSON() ([]byte, error)
func (BaseBlockdataMapItem) MarshalJSON ¶
func (bd BaseBlockdataMapItem) MarshalJSON() ([]byte, error)
func (BaseBlockdataMapItem) SetFile ¶
func (bd BaseBlockdataMapItem) SetFile(p string) BaseBlockdataMapItem
func (BaseBlockdataMapItem) SetURL ¶
func (bd BaseBlockdataMapItem) SetURL(u string) BaseBlockdataMapItem
func (BaseBlockdataMapItem) Type ¶
func (bd BaseBlockdataMapItem) Type() string
func (BaseBlockdataMapItem) URL ¶
func (bd BaseBlockdataMapItem) URL() string
func (BaseBlockdataMapItem) URLBody ¶
func (bd BaseBlockdataMapItem) URLBody() string
func (*BaseBlockdataMapItem) UnmarshalBSON ¶
func (bd *BaseBlockdataMapItem) UnmarshalBSON(b []byte) error
func (*BaseBlockdataMapItem) UnmarshalJSON ¶
func (bd *BaseBlockdataMapItem) UnmarshalJSON(b []byte) error
type BlockUpdater ¶
type BlockUpdater interface { Block SetManifest(Manifest) BlockUpdater SetINITVoteproof(base.Voteproof) BlockUpdater SetACCEPTVoteproof(base.Voteproof) BlockUpdater SetOperationsTree(tree.FixedTree) BlockUpdater SetOperations([]operation.Operation) BlockUpdater SetStatesTree(tree.FixedTree) BlockUpdater SetStates([]state.State) BlockUpdater SetProposal(base.SignedBallotFact) BlockUpdater SetSuffrageInfo(SuffrageInfo) BlockUpdater }
type BlockV0 ¶
type BlockV0 struct { hint.BaseHinter ManifestV0 // contains filtered or unexported fields }
func EmptyBlockV0 ¶
func EmptyBlockV0() BlockV0
func NewBlockV0 ¶
func (BlockV0) ConsensusInfo ¶
func (bm BlockV0) ConsensusInfo() ConsensusInfo
func (BlockV0) MarshalBSON ¶
func (BlockV0) MarshalJSON ¶
func (BlockV0) Operations ¶
func (BlockV0) OperationsTree ¶
func (BlockV0) SetACCEPTVoteproof ¶
func (bm BlockV0) SetACCEPTVoteproof(voteproof base.Voteproof) BlockUpdater
func (BlockV0) SetINITVoteproof ¶
func (bm BlockV0) SetINITVoteproof(voteproof base.Voteproof) BlockUpdater
func (BlockV0) SetManifest ¶
func (bm BlockV0) SetManifest(m Manifest) BlockUpdater
func (BlockV0) SetOperations ¶
func (bm BlockV0) SetOperations(ops []operation.Operation) BlockUpdater
func (BlockV0) SetOperationsTree ¶
func (bm BlockV0) SetOperationsTree(tr tree.FixedTree) BlockUpdater
func (BlockV0) SetProposal ¶
func (bm BlockV0) SetProposal(sfs base.SignedBallotFact) BlockUpdater
func (BlockV0) SetStatesTree ¶
func (bm BlockV0) SetStatesTree(tr tree.FixedTree) BlockUpdater
func (BlockV0) SetSuffrageInfo ¶
func (bm BlockV0) SetSuffrageInfo(sf SuffrageInfo) BlockUpdater
func (BlockV0) StatesTree ¶
type BlockV0PackJSON ¶
type BlockV0PackJSON struct { jsonenc.HintedHead MF ManifestV0 `json:"manifest"` CI ConsensusInfoV0 `json:"consensus"` OPT tree.FixedTree `json:"operations_tree"` OP []operation.Operation `json:"operations"` STT tree.FixedTree `json:"states_tree"` ST []state.State `json:"states"` }
type BlockV0UnpackBSON ¶
type BlockV0UnpackJSON ¶
type BlockV0UnpackJSON struct { MF json.RawMessage `json:"manifest"` CI json.RawMessage `json:"consensus"` OPT json.RawMessage `json:"operations_tree"` OP json.RawMessage `json:"operations"` STT json.RawMessage `json:"states_tree"` ST json.RawMessage `json:"states"` }
type BlockdataMap ¶
type BlockdataMap interface { hint.Hinter valuehash.HashGenerator valuehash.Hasher isvalid.IsValider // Writer indicates which writer stores block data Writer() hint.Hint Height() base.Height CreatedAt() time.Time IsLocal() bool Block() valuehash.Hash Manifest() BlockdataMapItem Operations() BlockdataMapItem OperationsTree() BlockdataMapItem States() BlockdataMapItem StatesTree() BlockdataMapItem INITVoteproof() BlockdataMapItem ACCEPTVoteproof() BlockdataMapItem SuffrageInfo() BlockdataMapItem Proposal() BlockdataMapItem }
type BlockdataMapItem ¶
type ConsensusInfo ¶
type ConsensusInfoV0 ¶
type ConsensusInfoV0 struct { hint.BaseHinter // contains filtered or unexported fields }
func (ConsensusInfoV0) ACCEPTVoteproof ¶
func (bc ConsensusInfoV0) ACCEPTVoteproof() base.Voteproof
func (ConsensusInfoV0) INITVoteproof ¶
func (bc ConsensusInfoV0) INITVoteproof() base.Voteproof
func (ConsensusInfoV0) IsValid ¶
func (bc ConsensusInfoV0) IsValid(networkID []byte) error
func (ConsensusInfoV0) MarshalBSON ¶
func (bc ConsensusInfoV0) MarshalBSON() ([]byte, error)
func (ConsensusInfoV0) MarshalJSON ¶
func (bc ConsensusInfoV0) MarshalJSON() ([]byte, error)
func (ConsensusInfoV0) Proposal ¶
func (bc ConsensusInfoV0) Proposal() base.SignedBallotFact
func (ConsensusInfoV0) SuffrageInfo ¶
func (bc ConsensusInfoV0) SuffrageInfo() SuffrageInfo
func (*ConsensusInfoV0) UnpackBSON ¶
func (bc *ConsensusInfoV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*ConsensusInfoV0) UnpackJSON ¶
func (bc *ConsensusInfoV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type ConsensusInfoV0PackJSON ¶
type ConsensusInfoV0PackJSON struct { jsonenc.HintedHead IV base.Voteproof `json:"init_voteproof,omitempty"` AV base.Voteproof `json:"accept_voteproof,omitempty"` SI SuffrageInfo `json:"suffrage_info,omitempty"` PR base.SignedBallotFact `json:"proposal,omitempty"` }
type ConsensusInfoV0UnpackJSON ¶
type ConsensusInfoV0UnpackJSON struct { IV json.RawMessage `json:"init_voteproof"` AV json.RawMessage `json:"accept_voteproof"` SI json.RawMessage `json:"suffrage_info"` PR json.RawMessage `json:"proposal"` }
type Manifest ¶
type Manifest interface { isvalid.IsValider hint.Hinter valuehash.Hasher zerolog.LogObjectMarshaler PreviousBlock() valuehash.Hash Height() base.Height Round() base.Round Proposal() valuehash.Hash OperationsHash() valuehash.Hash StatesHash() valuehash.Hash ConfirmedAt() time.Time CreatedAt() time.Time }
type ManifestV0 ¶
type ManifestV0 struct { hint.BaseHinter // contains filtered or unexported fields }
func (ManifestV0) ConfirmedAt ¶
func (bm ManifestV0) ConfirmedAt() time.Time
func (ManifestV0) CreatedAt ¶
func (bm ManifestV0) CreatedAt() time.Time
func (ManifestV0) GenerateHash ¶
func (bm ManifestV0) GenerateHash() valuehash.Hash
func (ManifestV0) Hash ¶
func (bm ManifestV0) Hash() valuehash.Hash
func (ManifestV0) Height ¶
func (bm ManifestV0) Height() base.Height
func (ManifestV0) IsValid ¶
func (bm ManifestV0) IsValid(networkID []byte) error
func (ManifestV0) MarshalBSON ¶
func (bm ManifestV0) MarshalBSON() ([]byte, error)
func (ManifestV0) MarshalJSON ¶
func (bm ManifestV0) MarshalJSON() ([]byte, error)
func (ManifestV0) MarshalZerologObject ¶
func (bm ManifestV0) MarshalZerologObject(e *zerolog.Event)
func (ManifestV0) OperationsHash ¶
func (bm ManifestV0) OperationsHash() valuehash.Hash
func (ManifestV0) PreviousBlock ¶
func (bm ManifestV0) PreviousBlock() valuehash.Hash
func (ManifestV0) Proposal ¶
func (bm ManifestV0) Proposal() valuehash.Hash
func (ManifestV0) Round ¶
func (bm ManifestV0) Round() base.Round
func (ManifestV0) StatesHash ¶
func (bm ManifestV0) StatesHash() valuehash.Hash
func (*ManifestV0) UnpackBSON ¶
func (bm *ManifestV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*ManifestV0) UnpackJSON ¶
func (bm *ManifestV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type ManifestV0PackJSON ¶
type ManifestV0PackJSON struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` HT base.Height `json:"height"` RD base.Round `json:"round"` PR valuehash.Hash `json:"proposal"` PB valuehash.Hash `json:"previous_block"` BO valuehash.Hash `json:"block_operations"` BS valuehash.Hash `json:"block_states"` CF localtime.Time `json:"confirmed_at"` CA localtime.Time `json:"created_at"` }
type ManifestV0UnpackBSON ¶
type ManifestV0UnpackBSON struct { H valuehash.Bytes `bson:"hash"` HT base.Height `bson:"height"` RD base.Round `bson:"round"` PR valuehash.Bytes `bson:"proposal"` PB valuehash.Bytes `bson:"previous_block"` BO valuehash.Bytes `bson:"block_operations,omitempty"` BS valuehash.Bytes `bson:"block_states,omitempty"` CF time.Time `bson:"confirmed_at"` CA time.Time `bson:"created_at"` }
type ManifestV0UnpackJSON ¶
type ManifestV0UnpackJSON struct { jsonenc.HintedHead H valuehash.Bytes `json:"hash"` HT base.Height `json:"height"` RD base.Round `json:"round"` PR valuehash.Bytes `json:"proposal"` PB valuehash.Bytes `json:"previous_block"` BO valuehash.Bytes `json:"block_operations"` BS valuehash.Bytes `json:"block_states"` CF localtime.Time `json:"confirmed_at"` CA localtime.Time `json:"created_at"` }
type SuffrageInfo ¶
type SuffrageInfoV0 ¶
type SuffrageInfoV0 struct { hint.BaseHinter // contains filtered or unexported fields }
func NewSuffrageInfoV0 ¶
func NewSuffrageInfoV0(proposer base.Address, nodes []base.Node) SuffrageInfoV0
func (SuffrageInfoV0) IsValid ¶
func (si SuffrageInfoV0) IsValid([]byte) error
func (SuffrageInfoV0) MarshalBSON ¶
func (si SuffrageInfoV0) MarshalBSON() ([]byte, error)
func (SuffrageInfoV0) MarshalJSON ¶
func (si SuffrageInfoV0) MarshalJSON() ([]byte, error)
func (SuffrageInfoV0) Nodes ¶
func (si SuffrageInfoV0) Nodes() []base.Node
func (SuffrageInfoV0) Proposer ¶
func (si SuffrageInfoV0) Proposer() base.Address
func (*SuffrageInfoV0) UnpackBSON ¶
func (si *SuffrageInfoV0) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInfoV0) UnpackJSON ¶
func (si *SuffrageInfoV0) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type SuffrageInfoV0PackJSON ¶
type SuffrageInfoV0UnpackBSON ¶
type SuffrageInfoV0UnpackBSON struct { PR base.AddressDecoder `bson:"proposer"` NS bson.Raw `bson:"nodes"` }
type SuffrageInfoV0UnpackJSON ¶
type SuffrageInfoV0UnpackJSON struct { PR base.AddressDecoder `json:"proposer"` NS json.RawMessage `json:"nodes"` }
Source Files ¶
- base_map.go
- block.go
- block_v0.go
- block_v0_bson.go
- block_v0_consensus_info.go
- block_v0_consensus_info_bson.go
- block_v0_consensus_info_encode.go
- block_v0_consensus_info_json.go
- block_v0_encode.go
- block_v0_json.go
- block_v0_log.go
- block_v0_manifest.go
- block_v0_manifest_bson.go
- block_v0_manifest_encode.go
- block_v0_manifest_json.go
- doc.go
- map.go
- map_bson.go
- map_encode.go
- map_json.go
- util.go
Click to show internal directories.
Click to hide internal directories.