Documentation ¶
Index ¶
- Constants
- Variables
- func NewObjectImpl(tag icobject.Tag) (icobject.Impl, error)
- type BTPDSA
- type BTPPublicKey
- func (b *BTPPublicKey) Equal(o icobject.Impl) bool
- func (b *BTPPublicKey) Format(f fmt.State, c rune)
- func (b *BTPPublicKey) From() *common.Address
- func (b *BTPPublicKey) Index() int
- func (b *BTPPublicKey) RLPDecodeFields(decoder codec.Decoder) error
- func (b *BTPPublicKey) RLPEncodeFields(encoder codec.Encoder) error
- func (b *BTPPublicKey) Version() int
- type BlockProduce
- func (bp *BlockProduce) Clear()
- func (bp *BlockProduce) Equal(o icobject.Impl) bool
- func (bp *BlockProduce) Format(f fmt.State, c rune)
- func (bp *BlockProduce) IsEmpty() bool
- func (bp *BlockProduce) ProposerIndex() int
- func (bp *BlockProduce) RLPDecodeFields(decoder codec.Decoder) error
- func (bp *BlockProduce) RLPEncodeFields(encoder codec.Encoder) error
- func (bp *BlockProduce) SetProposerIndex(index int)
- func (bp *BlockProduce) SetVoteCount(count int)
- func (bp *BlockProduce) SetVoteMask(mask *big.Int)
- func (bp *BlockProduce) String() string
- func (bp *BlockProduce) Version() int
- func (bp *BlockProduce) VoteCount() int
- func (bp *BlockProduce) VoteMask() *big.Int
- type EnableStatus
- type EventDelegationV2
- func (e *EventDelegationV2) Delegated() VoteList
- func (e *EventDelegationV2) Delegating() VoteList
- func (e *EventDelegationV2) Equal(o icobject.Impl) bool
- func (e *EventDelegationV2) Format(f fmt.State, c rune)
- func (e *EventDelegationV2) From() *common.Address
- func (e *EventDelegationV2) RLPDecodeFields(decoder codec.Decoder) error
- func (e *EventDelegationV2) RLPEncodeFields(encoder codec.Encoder) error
- func (e *EventDelegationV2) Version() int
- type EventEnable
- func (ee *EventEnable) Equal(o icobject.Impl) bool
- func (ee *EventEnable) Format(f fmt.State, c rune)
- func (ee *EventEnable) RLPDecodeFields(decoder codec.Decoder) error
- func (ee *EventEnable) RLPEncodeFields(encoder codec.Encoder) error
- func (ee *EventEnable) Status() EnableStatus
- func (ee *EventEnable) Target() *common.Address
- func (ee *EventEnable) Version() int
- type EventVote
- func (e *EventVote) Equal(o icobject.Impl) bool
- func (e *EventVote) Format(f fmt.State, c rune)
- func (e *EventVote) From() *common.Address
- func (e *EventVote) RLPDecodeFields(decoder codec.Decoder) error
- func (e *EventVote) RLPEncodeFields(encoder codec.Encoder) error
- func (e *EventVote) Version() int
- func (e *EventVote) Votes() VoteList
- type EventVotedReward
- type Global
- type GlobalV1
- func (g *GlobalV1) Equal(impl icobject.Impl) bool
- func (g *GlobalV1) Format(f fmt.State, c rune)
- func (g *GlobalV1) GetBondRequirement() int
- func (g *GlobalV1) GetElectedPRepCount() int
- func (g *GlobalV1) GetIISSVersion() int
- func (g *GlobalV1) GetIRep() *big.Int
- func (g *GlobalV1) GetMainRepCount() int
- func (g *GlobalV1) GetOffsetLimit() int
- func (g *GlobalV1) GetRRep() *big.Int
- func (g *GlobalV1) GetRevision() int
- func (g *GlobalV1) GetStartHeight() int64
- func (g *GlobalV1) GetTermPeriod() int
- func (g *GlobalV1) GetV1() *GlobalV1
- func (g *GlobalV1) GetV2() *GlobalV2
- func (g *GlobalV1) RLPDecodeFields(decoder codec.Decoder) error
- func (g *GlobalV1) RLPEncodeFields(encoder codec.Encoder) error
- func (g *GlobalV1) String() string
- func (g *GlobalV1) Version() int
- type GlobalV2
- func (g *GlobalV2) Equal(impl icobject.Impl) bool
- func (g *GlobalV2) Format(f fmt.State, c rune)
- func (g *GlobalV2) GetBondRequirement() int
- func (g *GlobalV2) GetElectedPRepCount() int
- func (g *GlobalV2) GetICps() *big.Int
- func (g *GlobalV2) GetIGlobal() *big.Int
- func (g *GlobalV2) GetIISSVersion() int
- func (g *GlobalV2) GetIPRep() *big.Int
- func (g *GlobalV2) GetIRelay() *big.Int
- func (g *GlobalV2) GetIVoter() *big.Int
- func (g *GlobalV2) GetOffsetLimit() int
- func (g *GlobalV2) GetRevision() int
- func (g *GlobalV2) GetStartHeight() int64
- func (g *GlobalV2) GetTermPeriod() int
- func (g *GlobalV2) GetV1() *GlobalV1
- func (g *GlobalV2) GetV2() *GlobalV2
- func (g *GlobalV2) RLPDecodeFields(decoder codec.Decoder) error
- func (g *GlobalV2) RLPEncodeFields(encoder codec.Encoder) error
- func (g *GlobalV2) String() string
- func (g *GlobalV2) Version() int
- type IScoreClaim
- func (ic *IScoreClaim) Added(amount *big.Int) *IScoreClaim
- func (ic *IScoreClaim) Equal(impl icobject.Impl) bool
- func (ic *IScoreClaim) Format(f fmt.State, c rune)
- func (ic *IScoreClaim) RLPDecodeFields(decoder codec.Decoder) error
- func (ic *IScoreClaim) RLPEncodeFields(encoder codec.Encoder) error
- func (ic *IScoreClaim) String() string
- func (ic *IScoreClaim) Value() *big.Int
- func (ic *IScoreClaim) Version() int
- type Snapshot
- func (ss *Snapshot) Bytes() []byte
- func (ss *Snapshot) Filter(prefix []byte) trie.IteratorForObject
- func (ss *Snapshot) Flush() error
- func (ss *Snapshot) GetBlockProduce(offset int) (*BlockProduce, error)
- func (ss *Snapshot) GetGlobal() (Global, error)
- func (ss *Snapshot) GetValidators() (ret []module.Address, err error)
- type State
- func (s *State) AddBTPDSA(offset int, index int, value int) error
- func (s *State) AddBTPPublicKey(offset int, index int, from module.Address, value int) error
- func (s *State) AddBlockProduce(blockHeight int64, proposer module.Address, voters []module.Address) error
- func (s *State) AddEventBond(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)
- func (s *State) AddEventDelegated(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)
- func (s *State) AddEventDelegation(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)
- func (s *State) AddEventDelegationV2(offset int, from module.Address, delegated VoteList, delegating VoteList) (int64, *icobject.Object, error)
- func (s *State) AddEventEnable(offset int, target module.Address, status EnableStatus) (int64, error)
- func (s *State) AddEventVotedReward(offset int) (int64, error)
- func (s *State) AddGlobalV1(revision int, startHeight int64, offsetLimit int, irep *big.Int, rrep *big.Int, ...) error
- func (s *State) AddGlobalV2(revision int, startHeight int64, offsetLimit int, iglobal *big.Int, ...) error
- func (s *State) AddIScoreClaim(addr module.Address, amount *big.Int) (*IScoreClaim, error)
- func (s *State) ClearCache()
- func (s *State) GetEvent(offset int, index int64) (*icobject.Object, error)
- func (s *State) GetGlobal() (Global, error)
- func (s *State) GetIScoreClaim(addr module.Address) (*IScoreClaim, error)
- func (s *State) GetSnapshot() *Snapshot
- func (s *State) Reset(ss *Snapshot)
- func (s *State) ResetEventSize() error
- type Vote
- func (v *Vote) Amount() *big.Int
- func (v *Vote) Clone() *Vote
- func (v *Vote) Equal(v2 *Vote) bool
- func (v *Vote) Format(f fmt.State, c rune)
- func (v *Vote) RLPDecodeSelf(decoder codec.Decoder) error
- func (v *Vote) RLPEncodeSelf(encoder codec.Encoder) error
- func (v *Vote) SetAmount(amount *big.Int)
- func (v *Vote) To() module.Address
- type VoteList
Constants ¶
View Source
const ( GlobalVersion1 int = iota GlobalVersion2 )
View Source
const ( TypeIScoreClaim int = iota TypeEventDelegation TypeEventBond TypeEventEnable TypeBlockProduce TypeGlobal TypeEventVotedReward TypeEventDelegationV2 TypeEventDelegated TypeBTPDSA TypeBTPPublicKey )
Variables ¶
View Source
var ( IScoreClaimKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x10}) EventKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x20}) BlockProduceKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x30}) ValidatorKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x40}) BTPKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x50}) HashKey = containerdb.ToKey(containerdb.PrefixedHashBuilder, []byte{0x70}) GlobalKey = containerdb.ToKey(containerdb.RawBuilder, HashKey.Append(globalKey).Build()).Build() EventSizeKey = containerdb.ToKey(containerdb.RawBuilder, HashKey.Append(eventsKey).Build()) ValidatorsKey = containerdb.ToKey(containerdb.RawBuilder, HashKey.Append(validatorsKey).Build()) )
Functions ¶
Types ¶
type BTPDSA ¶ added in v1.3.0
type BTPDSA struct { icobject.NoDatabase // contains filtered or unexported fields }
func (*BTPDSA) RLPDecodeFields ¶ added in v1.3.0
func (*BTPDSA) RLPEncodeFields ¶ added in v1.3.0
type BTPPublicKey ¶ added in v1.3.0
type BTPPublicKey struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewBTPPublicKey ¶ added in v1.3.0
func NewBTPPublicKey(addr *common.Address, index int) *BTPPublicKey
func ToBTPPublicKey ¶ added in v1.3.0
func ToBTPPublicKey(obj trie.Object) *BTPPublicKey
func (*BTPPublicKey) From ¶ added in v1.3.0
func (b *BTPPublicKey) From() *common.Address
func (*BTPPublicKey) Index ¶ added in v1.3.0
func (b *BTPPublicKey) Index() int
func (*BTPPublicKey) RLPDecodeFields ¶ added in v1.3.0
func (b *BTPPublicKey) RLPDecodeFields(decoder codec.Decoder) error
func (*BTPPublicKey) RLPEncodeFields ¶ added in v1.3.0
func (b *BTPPublicKey) RLPEncodeFields(encoder codec.Encoder) error
func (*BTPPublicKey) Version ¶ added in v1.3.0
func (b *BTPPublicKey) Version() int
type BlockProduce ¶
type BlockProduce struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewBlockProduce ¶ added in v0.9.7
func NewBlockProduce(pIndex, vCount int, vMask *big.Int) *BlockProduce
func ToBlockProduce ¶
func ToBlockProduce(obj trie.Object) *BlockProduce
func (*BlockProduce) Clear ¶
func (bp *BlockProduce) Clear()
func (*BlockProduce) IsEmpty ¶
func (bp *BlockProduce) IsEmpty() bool
func (*BlockProduce) ProposerIndex ¶
func (bp *BlockProduce) ProposerIndex() int
func (*BlockProduce) RLPDecodeFields ¶
func (bp *BlockProduce) RLPDecodeFields(decoder codec.Decoder) error
func (*BlockProduce) RLPEncodeFields ¶
func (bp *BlockProduce) RLPEncodeFields(encoder codec.Encoder) error
func (*BlockProduce) SetProposerIndex ¶ added in v0.9.7
func (bp *BlockProduce) SetProposerIndex(index int)
func (*BlockProduce) SetVoteCount ¶ added in v0.9.7
func (bp *BlockProduce) SetVoteCount(count int)
func (*BlockProduce) SetVoteMask ¶ added in v0.9.7
func (bp *BlockProduce) SetVoteMask(mask *big.Int)
func (*BlockProduce) String ¶ added in v0.9.7
func (bp *BlockProduce) String() string
func (*BlockProduce) Version ¶
func (bp *BlockProduce) Version() int
func (*BlockProduce) VoteCount ¶
func (bp *BlockProduce) VoteCount() int
func (*BlockProduce) VoteMask ¶
func (bp *BlockProduce) VoteMask() *big.Int
type EnableStatus ¶ added in v0.9.7
type EnableStatus int
const ( ESEnable EnableStatus = iota ESDisableTemp ESDisablePermanent ESMax )
func (EnableStatus) IsDisabledPermanently ¶ added in v0.9.8
func (ef EnableStatus) IsDisabledPermanently() bool
func (EnableStatus) IsDisabledTemporarily ¶ added in v0.9.7
func (ef EnableStatus) IsDisabledTemporarily() bool
func (EnableStatus) IsEnabled ¶ added in v0.9.7
func (ef EnableStatus) IsEnabled() bool
func (EnableStatus) String ¶ added in v0.9.7
func (ef EnableStatus) String() string
type EventDelegationV2 ¶ added in v0.9.10
type EventDelegationV2 struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewEventDelegationV2 ¶ added in v0.9.10
func NewEventDelegationV2(addr *common.Address, delegated VoteList, delegating VoteList) *EventDelegationV2
func ToEventDelegationV2 ¶ added in v0.9.10
func ToEventDelegationV2(obj trie.Object) *EventDelegationV2
func (*EventDelegationV2) Delegated ¶ added in v0.9.10
func (e *EventDelegationV2) Delegated() VoteList
func (*EventDelegationV2) Delegating ¶ added in v0.9.10
func (e *EventDelegationV2) Delegating() VoteList
func (*EventDelegationV2) Equal ¶ added in v0.9.10
func (e *EventDelegationV2) Equal(o icobject.Impl) bool
func (*EventDelegationV2) Format ¶ added in v0.9.10
func (e *EventDelegationV2) Format(f fmt.State, c rune)
func (*EventDelegationV2) From ¶ added in v0.9.10
func (e *EventDelegationV2) From() *common.Address
func (*EventDelegationV2) RLPDecodeFields ¶ added in v0.9.10
func (e *EventDelegationV2) RLPDecodeFields(decoder codec.Decoder) error
func (*EventDelegationV2) RLPEncodeFields ¶ added in v0.9.10
func (e *EventDelegationV2) RLPEncodeFields(encoder codec.Encoder) error
func (*EventDelegationV2) Version ¶ added in v0.9.10
func (e *EventDelegationV2) Version() int
type EventEnable ¶
type EventEnable struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewEventEnable ¶ added in v0.9.7
func NewEventEnable(target *common.Address, status EnableStatus) *EventEnable
func ToEventEnable ¶
func ToEventEnable(obj trie.Object) *EventEnable
func (*EventEnable) RLPDecodeFields ¶
func (ee *EventEnable) RLPDecodeFields(decoder codec.Decoder) error
func (*EventEnable) RLPEncodeFields ¶
func (ee *EventEnable) RLPEncodeFields(encoder codec.Encoder) error
func (*EventEnable) Status ¶ added in v0.9.7
func (ee *EventEnable) Status() EnableStatus
func (*EventEnable) Target ¶
func (ee *EventEnable) Target() *common.Address
func (*EventEnable) Version ¶
func (ee *EventEnable) Version() int
type EventVote ¶
type EventVote struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewEventVote ¶ added in v0.9.7
func ToEventVote ¶
func (*EventVote) RLPDecodeFields ¶
func (*EventVote) RLPEncodeFields ¶
type EventVotedReward ¶ added in v0.9.8
type EventVotedReward struct {
icobject.NoDatabase
}
func NewEventVotedReward ¶ added in v0.9.8
func NewEventVotedReward() *EventVotedReward
func ToEventVotedReward ¶ added in v0.9.8
func ToEventVotedReward(obj trie.Object) *EventVotedReward
func (*EventVotedReward) Equal ¶ added in v0.9.8
func (ee *EventVotedReward) Equal(o icobject.Impl) bool
func (*EventVotedReward) Format ¶ added in v0.9.8
func (ee *EventVotedReward) Format(f fmt.State, c rune)
func (*EventVotedReward) RLPDecodeFields ¶ added in v0.9.8
func (ee *EventVotedReward) RLPDecodeFields(decoder codec.Decoder) error
func (*EventVotedReward) RLPEncodeFields ¶ added in v0.9.8
func (ee *EventVotedReward) RLPEncodeFields(encoder codec.Encoder) error
func (*EventVotedReward) Version ¶ added in v0.9.8
func (ee *EventVotedReward) Version() int
type Global ¶
type GlobalV1 ¶
type GlobalV1 struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewGlobalV1 ¶ added in v0.9.7
func (*GlobalV1) GetBondRequirement ¶
func (*GlobalV1) GetElectedPRepCount ¶
func (*GlobalV1) GetIISSVersion ¶
func (*GlobalV1) GetMainRepCount ¶ added in v0.9.7
func (*GlobalV1) GetOffsetLimit ¶
func (*GlobalV1) GetRevision ¶
func (*GlobalV1) GetStartHeight ¶
func (*GlobalV1) GetTermPeriod ¶
type GlobalV2 ¶
type GlobalV2 struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewGlobalV2 ¶ added in v0.9.7
func (*GlobalV2) GetBondRequirement ¶
func (*GlobalV2) GetElectedPRepCount ¶
func (*GlobalV2) GetIGlobal ¶ added in v0.9.7
func (*GlobalV2) GetIISSVersion ¶
func (*GlobalV2) GetOffsetLimit ¶
func (*GlobalV2) GetRevision ¶
func (*GlobalV2) GetStartHeight ¶
func (*GlobalV2) GetTermPeriod ¶
type IScoreClaim ¶
type IScoreClaim struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewIScoreClaim ¶ added in v0.9.7
func NewIScoreClaim(value *big.Int) *IScoreClaim
func ToIScoreClaim ¶
func ToIScoreClaim(obj trie.Object) *IScoreClaim
func (*IScoreClaim) Added ¶
func (ic *IScoreClaim) Added(amount *big.Int) *IScoreClaim
func (*IScoreClaim) RLPDecodeFields ¶ added in v0.9.7
func (ic *IScoreClaim) RLPDecodeFields(decoder codec.Decoder) error
func (*IScoreClaim) RLPEncodeFields ¶ added in v0.9.7
func (ic *IScoreClaim) RLPEncodeFields(encoder codec.Encoder) error
func (*IScoreClaim) String ¶ added in v0.9.7
func (ic *IScoreClaim) String() string
func (*IScoreClaim) Value ¶ added in v0.9.7
func (ic *IScoreClaim) Value() *big.Int
func (*IScoreClaim) Version ¶ added in v0.9.7
func (ic *IScoreClaim) Version() int
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func NewSnapshotWithBuilder ¶
func (*Snapshot) GetBlockProduce ¶
func (ss *Snapshot) GetBlockProduce(offset int) (*BlockProduce, error)
type State ¶
type State struct {
// contains filtered or unexported fields
}
func NewStateFromSnapshot ¶
func (*State) AddBTPPublicKey ¶ added in v1.3.0
func (*State) AddBlockProduce ¶
func (*State) AddEventBond ¶
func (*State) AddEventDelegated ¶ added in v0.9.10
func (*State) AddEventDelegation ¶
func (*State) AddEventDelegationV2 ¶ added in v0.9.10
func (*State) AddEventEnable ¶
func (*State) AddEventVotedReward ¶ added in v0.9.8
func (*State) AddGlobalV1 ¶
func (*State) AddGlobalV2 ¶
func (*State) AddIScoreClaim ¶
func (*State) ClearCache ¶ added in v0.9.7
func (s *State) ClearCache()
func (*State) GetIScoreClaim ¶
func (s *State) GetIScoreClaim(addr module.Address) (*IScoreClaim, error)
func (*State) GetSnapshot ¶
func (*State) ResetEventSize ¶ added in v0.9.7
type Vote ¶
type Vote struct {
// contains filtered or unexported fields
}
func (*Vote) RLPDecodeSelf ¶ added in v0.9.7
func (*Vote) RLPEncodeSelf ¶ added in v0.9.7
Click to show internal directories.
Click to hide internal directories.