Documentation ¶
Index ¶
- Constants
- Variables
- func NewObjectImpl(tag icobject.Tag) (icobject.Impl, error)
- type Bonding
- func (b *Bonding) ApplyVotes(deltas icstage.VoteList) error
- func (b *Bonding) Clone() *Bonding
- func (b *Bonding) Equal(o icobject.Impl) bool
- func (b *Bonding) Format(f fmt.State, c rune)
- func (b *Bonding) IsEmpty() bool
- func (b *Bonding) RLPDecodeFields(decoder codec.Decoder) error
- func (b *Bonding) RLPEncodeFields(encoder codec.Encoder) error
- func (b *Bonding) Version() int
- type BugDisabledPRep
- func (is *BugDisabledPRep) Equal(o icobject.Impl) bool
- func (is *BugDisabledPRep) Format(f fmt.State, c rune)
- func (is *BugDisabledPRep) RLPDecodeFields(decoder codec.Decoder) error
- func (is *BugDisabledPRep) RLPEncodeFields(encoder codec.Encoder) error
- func (is *BugDisabledPRep) Value() *big.Int
- func (is *BugDisabledPRep) Version() int
- type DSA
- type Delegating
- func (d *Delegating) ApplyVotes(deltas icstage.VoteList) error
- func (d *Delegating) Clone() *Delegating
- func (d *Delegating) Equal(o icobject.Impl) bool
- func (d *Delegating) Format(f fmt.State, c rune)
- func (d *Delegating) IsEmpty() bool
- func (d *Delegating) RLPDecodeFields(decoder codec.Decoder) error
- func (d *Delegating) RLPEncodeFields(encoder codec.Encoder) error
- func (d *Delegating) Version() int
- type IScore
- func (is *IScore) Added(amount *big.Int) *IScore
- func (is *IScore) Clear()
- func (is *IScore) Clone() *IScore
- func (is *IScore) Equal(o icobject.Impl) bool
- func (is *IScore) Format(f fmt.State, c rune)
- func (is *IScore) IsEmpty() bool
- func (is *IScore) RLPDecodeFields(decoder codec.Decoder) error
- func (is *IScore) RLPEncodeFields(encoder codec.Encoder) error
- func (is *IScore) Subtracted(amount *big.Int) *IScore
- func (is *IScore) Value() *big.Int
- func (is *IScore) Version() int
- type PublicKey
- func (p *PublicKey) Equal(o icobject.Impl) bool
- func (p *PublicKey) Format(f fmt.State, c rune)
- func (p *PublicKey) HasAll(dsaMask int64) bool
- func (p *PublicKey) RLPDecodeFields(decoder codec.Decoder) error
- func (p *PublicKey) RLPEncodeFields(encoder codec.Encoder) error
- func (p *PublicKey) Updated(index int) *PublicKey
- func (p *PublicKey) Version() int
- type Snapshot
- type State
- func (s *State) AddBugDisabledPRep(addr module.Address, value *BugDisabledPRep) error
- func (s *State) DeleteBugDisabledPRep(addr module.Address) error
- func (s *State) GetBonding(addr module.Address) (*Bonding, error)
- func (s *State) GetDSA() (*DSA, error)
- func (s *State) GetDelegating(addr module.Address) (*Delegating, error)
- func (s *State) GetIScore(addr module.Address) (*IScore, error)
- func (s *State) GetPublicKey(addr module.Address) (*PublicKey, error)
- func (s *State) GetSnapshot() *Snapshot
- func (s *State) GetVoted(addr module.Address) (*Voted, error)
- func (s *State) Reset(ss *Snapshot)
- func (s *State) SetBonding(addr module.Address, bonding *Bonding) error
- func (s *State) SetDSA(value *DSA) error
- func (s *State) SetDelegating(addr module.Address, delegating *Delegating) error
- func (s *State) SetIScore(addr module.Address, iScore *IScore) error
- func (s *State) SetPublicKey(addr module.Address, value *PublicKey) error
- func (s *State) SetVoted(addr module.Address, voted *Voted) error
- type Voted
- func (v *Voted) Bonded() *big.Int
- func (v *Voted) BondedDelegation() *big.Int
- func (v *Voted) Clone() *Voted
- func (v *Voted) Delegated() *big.Int
- func (v *Voted) Enable() bool
- func (v *Voted) Equal(o icobject.Impl) bool
- func (v *Voted) Format(f fmt.State, c rune)
- func (v *Voted) GetVotedAmount() *big.Int
- func (v *Voted) IsEmpty() bool
- func (v *Voted) RLPDecodeFields(decoder codec.Decoder) error
- func (v *Voted) RLPEncodeFields(encoder codec.Encoder) error
- func (v *Voted) SetBonded(value *big.Int)
- func (v *Voted) SetBondedDelegation(value *big.Int)
- func (v *Voted) SetDelegated(value *big.Int)
- func (v *Voted) SetEnable(enable bool)
- func (v *Voted) UpdateBondedDelegation(bondRequirement int)
- func (v *Voted) Version() int
- type Voting
Constants ¶
View Source
const ( TypeVoted int = iota TypeDelegating TypeBonding TypeIScore TypeBugDisabledPRep TypeDSA TypePublicKey )
Variables ¶
View Source
var ( VotedKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x10}) DelegatingKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x20}) BondingKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x30}) IScoreKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x40}) BugDisabledPRepKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x50}) PubKeyKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x60}) HashKey = containerdb.ToKey(containerdb.PrefixedHashBuilder, []byte{0x80}) DSAKey = containerdb.ToKey(containerdb.RawBuilder, HashKey.Append(btpDSAKey).Build()).Build() )
Functions ¶
Types ¶
type Bonding ¶
type Bonding struct { icobject.NoDatabase icstate.Bonds }
func NewBonding ¶
func NewBonding() *Bonding
type BugDisabledPRep ¶ added in v0.9.8
type BugDisabledPRep struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewBugDisabledPRep ¶ added in v0.9.8
func NewBugDisabledPRep(value *big.Int) *BugDisabledPRep
func ToBugDisabledPRep ¶ added in v0.9.8
func ToBugDisabledPRep(obj trie.Object) *BugDisabledPRep
func (*BugDisabledPRep) Equal ¶ added in v0.9.8
func (is *BugDisabledPRep) Equal(o icobject.Impl) bool
func (*BugDisabledPRep) Format ¶ added in v0.9.8
func (is *BugDisabledPRep) Format(f fmt.State, c rune)
func (*BugDisabledPRep) RLPDecodeFields ¶ added in v0.9.8
func (is *BugDisabledPRep) RLPDecodeFields(decoder codec.Decoder) error
func (*BugDisabledPRep) RLPEncodeFields ¶ added in v0.9.8
func (is *BugDisabledPRep) RLPEncodeFields(encoder codec.Encoder) error
func (*BugDisabledPRep) Value ¶ added in v0.9.8
func (is *BugDisabledPRep) Value() *big.Int
func (*BugDisabledPRep) Version ¶ added in v0.9.8
func (is *BugDisabledPRep) Version() int
type DSA ¶ added in v1.3.0
type DSA struct { icobject.NoDatabase // contains filtered or unexported fields }
func (*DSA) RLPDecodeFields ¶ added in v1.3.0
func (*DSA) RLPEncodeFields ¶ added in v1.3.0
type Delegating ¶
type Delegating struct { icobject.NoDatabase icstate.Delegations }
func NewDelegating ¶
func NewDelegating() *Delegating
func ToDelegating ¶
func ToDelegating(obj trie.Object) *Delegating
func (*Delegating) ApplyVotes ¶
func (d *Delegating) ApplyVotes(deltas icstage.VoteList) error
func (*Delegating) Clone ¶
func (d *Delegating) Clone() *Delegating
func (*Delegating) IsEmpty ¶
func (d *Delegating) IsEmpty() bool
func (*Delegating) RLPDecodeFields ¶
func (d *Delegating) RLPDecodeFields(decoder codec.Decoder) error
func (*Delegating) RLPEncodeFields ¶
func (d *Delegating) RLPEncodeFields(encoder codec.Encoder) error
func (*Delegating) Version ¶
func (d *Delegating) Version() int
type IScore ¶
type IScore struct { icobject.NoDatabase // contains filtered or unexported fields }
func (*IScore) RLPDecodeFields ¶ added in v0.9.7
func (*IScore) RLPEncodeFields ¶ added in v0.9.7
type PublicKey ¶ added in v1.3.0
type PublicKey struct { icobject.NoDatabase // contains filtered or unexported fields }
func NewPublicKey ¶ added in v1.3.0
func NewPublicKey() *PublicKey
func ToPublicKey ¶ added in v1.3.0
func (*PublicKey) RLPDecodeFields ¶ added in v1.3.0
func (*PublicKey) RLPEncodeFields ¶ added in v1.3.0
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func NewSnapshotWithBuilder ¶
func (*Snapshot) GetPublicKey ¶ added in v1.3.0
type State ¶
type State struct {
// contains filtered or unexported fields
}
func NewStateFromSnapshot ¶
func (*State) AddBugDisabledPRep ¶ added in v0.9.8
func (s *State) AddBugDisabledPRep(addr module.Address, value *BugDisabledPRep) error
func (*State) DeleteBugDisabledPRep ¶ added in v0.9.8
func (*State) GetDelegating ¶
func (s *State) GetDelegating(addr module.Address) (*Delegating, error)
func (*State) GetPublicKey ¶ added in v1.3.0
func (*State) GetSnapshot ¶
func (*State) SetDelegating ¶
func (s *State) SetDelegating(addr module.Address, delegating *Delegating) error
func (*State) SetPublicKey ¶ added in v1.3.0
type Voted ¶
type Voted struct { icobject.NoDatabase // contains filtered or unexported fields }
func (*Voted) BondedDelegation ¶
func (*Voted) GetVotedAmount ¶ added in v0.9.7
func (*Voted) SetBondedDelegation ¶ added in v0.9.7
func (*Voted) SetDelegated ¶ added in v0.9.7
func (*Voted) UpdateBondedDelegation ¶
Click to show internal directories.
Click to hide internal directories.