icstage

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalVersion1 int = iota
	GlobalVersion2
	GlobalVersion3
)
View Source
const (
	TypeIScoreClaim int = iota
	TypeEventDelegation
	TypeEventBond
	TypeEventEnable
	TypeBlockProduce
	TypeGlobal
	TypeEventVotedReward
	TypeEventDelegationV2
	TypeEventDelegated
	TypeBTPDSA
	TypeBTPPublicKey
	TypeCommissionRate
)

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})
	CommissionRateKey = containerdb.ToKey(containerdb.RLPBuilder, []byte{0x60})
	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

func NewObjectImpl

func NewObjectImpl(tag icobject.Tag) (icobject.Impl, error)

Types

type BTPDSA added in v1.3.0

type BTPDSA struct {
	icobject.NoDatabase
	// contains filtered or unexported fields
}

func NewBTPDSA added in v1.3.0

func NewBTPDSA(index int) *BTPDSA

func ToBTPDSA added in v1.3.0

func ToBTPDSA(obj trie.Object) *BTPDSA

func (*BTPDSA) Equal added in v1.3.0

func (b *BTPDSA) Equal(o icobject.Impl) bool

func (*BTPDSA) Format added in v1.3.0

func (b *BTPDSA) Format(f fmt.State, c rune)

func (*BTPDSA) Index added in v1.3.0

func (b *BTPDSA) Index() int

func (*BTPDSA) RLPDecodeFields added in v1.3.0

func (b *BTPDSA) RLPDecodeFields(decoder codec.Decoder) error

func (*BTPDSA) RLPEncodeFields added in v1.3.0

func (b *BTPDSA) RLPEncodeFields(encoder codec.Encoder) error

func (*BTPDSA) Version added in v1.3.0

func (b *BTPDSA) Version() int

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) Equal added in v1.3.0

func (b *BTPPublicKey) Equal(o icobject.Impl) bool

func (*BTPPublicKey) Format added in v1.3.0

func (b *BTPPublicKey) Format(f fmt.State, c rune)

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) Equal

func (bp *BlockProduce) Equal(o icobject.Impl) bool

func (*BlockProduce) Format added in v0.9.7

func (bp *BlockProduce) Format(f fmt.State, c rune)

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 CommissionRate added in v1.4.0

type CommissionRate struct {
	icobject.NoDatabase
	// contains filtered or unexported fields
}

func NewCommissionRate added in v1.4.0

func NewCommissionRate(value icmodule.Rate) *CommissionRate

func ToCommissionRate added in v1.4.0

func ToCommissionRate(obj trie.Object) *CommissionRate

func (*CommissionRate) Equal added in v1.4.0

func (cr *CommissionRate) Equal(o icobject.Impl) bool

func (*CommissionRate) Format added in v1.4.0

func (cr *CommissionRate) Format(f fmt.State, c rune)

func (*CommissionRate) RLPDecodeFields added in v1.4.0

func (cr *CommissionRate) RLPDecodeFields(decoder codec.Decoder) error

func (*CommissionRate) RLPEncodeFields added in v1.4.0

func (cr *CommissionRate) RLPEncodeFields(encoder codec.Encoder) error

func (*CommissionRate) Value added in v1.4.0

func (cr *CommissionRate) Value() icmodule.Rate

func (*CommissionRate) Version added in v1.4.0

func (cr *CommissionRate) Version() int

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 icmodule.EnableStatus) *EventEnable

func ToEventEnable

func ToEventEnable(obj trie.Object) *EventEnable

func (*EventEnable) Equal

func (ee *EventEnable) Equal(o icobject.Impl) bool

func (*EventEnable) Format added in v0.9.7

func (ee *EventEnable) Format(f fmt.State, c rune)

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() icmodule.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 NewEventVote(addr *common.Address, votes VoteList) *EventVote

func ToEventVote

func ToEventVote(obj trie.Object) *EventVote

func (*EventVote) Equal

func (e *EventVote) Equal(o icobject.Impl) bool

func (*EventVote) Format added in v0.9.7

func (e *EventVote) Format(f fmt.State, c rune)

func (*EventVote) From

func (e *EventVote) From() *common.Address

func (*EventVote) RLPDecodeFields

func (e *EventVote) RLPDecodeFields(decoder codec.Decoder) error

func (*EventVote) RLPEncodeFields

func (e *EventVote) RLPEncodeFields(encoder codec.Encoder) error

func (*EventVote) Version

func (e *EventVote) Version() int

func (*EventVote) Votes

func (e *EventVote) Votes() VoteList

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 Global interface {
	icobject.Impl
	GetV1() *GlobalV1
	GetV2() *GlobalV2
	GetV3() *GlobalV3
	GetIISSVersion() int
	GetStartHeight() int64
	GetOffsetLimit() int
	GetTermPeriod() int
	GetRevision() int
	GetElectedPRepCount() int
	GetBondRequirement() icmodule.Rate
	String() string
}

func ToGlobal

func ToGlobal(obj trie.Object) Global

type GlobalV1

type GlobalV1 struct {
	// contains filtered or unexported fields
}

GlobalV1 global struct for icstate.IISSVersion2

func NewGlobalV1 added in v0.9.7

func NewGlobalV1(
	iissVersion int,
	startHeight int64,
	offsetLimit int,
	revision int,
	irep *big.Int,
	rrep *big.Int,
	mainPRepCount int,
	electedPRepCount int,
) *GlobalV1

func (*GlobalV1) Equal

func (g *GlobalV1) Equal(impl icobject.Impl) bool

func (*GlobalV1) Format added in v0.9.7

func (g *GlobalV1) Format(f fmt.State, c rune)

func (*GlobalV1) GetBondRequirement

func (g *GlobalV1) GetBondRequirement() icmodule.Rate

func (*GlobalV1) GetElectedPRepCount

func (g *GlobalV1) GetElectedPRepCount() int

func (*GlobalV1) GetIISSVersion

func (g *GlobalV1) GetIISSVersion() int

func (*GlobalV1) GetIRep added in v0.9.7

func (g *GlobalV1) GetIRep() *big.Int

func (*GlobalV1) GetMainRepCount added in v0.9.7

func (g *GlobalV1) GetMainRepCount() int

func (*GlobalV1) GetOffsetLimit

func (g *GlobalV1) GetOffsetLimit() int

func (*GlobalV1) GetRRep added in v0.9.7

func (g *GlobalV1) GetRRep() *big.Int

func (*GlobalV1) GetRevision

func (g *GlobalV1) GetRevision() int

func (*GlobalV1) GetStartHeight

func (g *GlobalV1) GetStartHeight() int64

func (*GlobalV1) GetTermPeriod

func (g *GlobalV1) GetTermPeriod() int

func (*GlobalV1) GetV1

func (g *GlobalV1) GetV1() *GlobalV1

func (*GlobalV1) GetV2

func (g *GlobalV1) GetV2() *GlobalV2

func (*GlobalV1) GetV3 added in v1.4.0

func (g *GlobalV1) GetV3() *GlobalV3

func (*GlobalV1) RLPDecodeFields

func (g *GlobalV1) RLPDecodeFields(decoder codec.Decoder) error

func (*GlobalV1) RLPEncodeFields

func (g *GlobalV1) RLPEncodeFields(encoder codec.Encoder) error

func (*GlobalV1) String

func (g *GlobalV1) String() string

func (*GlobalV1) Version

func (g *GlobalV1) Version() int

type GlobalV2

type GlobalV2 struct {
	// contains filtered or unexported fields
}

GlobalV2 global struct for icstate.IISSVersion3

func NewGlobalV2 added in v0.9.7

func NewGlobalV2(
	iissVersion int,
	startHeight int64,
	offsetLimit int,
	revision int,
	iglobal *big.Int,
	iprep,
	ivoter,
	icps,
	irelay icmodule.Rate,
	electedPRepCount int,
	bondRequirement icmodule.Rate,
) *GlobalV2

func (*GlobalV2) Equal

func (g *GlobalV2) Equal(impl icobject.Impl) bool

func (*GlobalV2) Format added in v0.9.7

func (g *GlobalV2) Format(f fmt.State, c rune)

func (*GlobalV2) GetBondRequirement

func (g *GlobalV2) GetBondRequirement() icmodule.Rate

func (*GlobalV2) GetElectedPRepCount

func (g *GlobalV2) GetElectedPRepCount() int

func (*GlobalV2) GetICps added in v0.9.7

func (g *GlobalV2) GetICps() icmodule.Rate

func (*GlobalV2) GetIGlobal added in v0.9.7

func (g *GlobalV2) GetIGlobal() *big.Int

func (*GlobalV2) GetIISSVersion

func (g *GlobalV2) GetIISSVersion() int

func (*GlobalV2) GetIPRep added in v0.9.7

func (g *GlobalV2) GetIPRep() icmodule.Rate

func (*GlobalV2) GetIRelay added in v0.9.7

func (g *GlobalV2) GetIRelay() icmodule.Rate

func (*GlobalV2) GetIVoter added in v0.9.7

func (g *GlobalV2) GetIVoter() icmodule.Rate

func (*GlobalV2) GetOffsetLimit

func (g *GlobalV2) GetOffsetLimit() int

func (*GlobalV2) GetRevision

func (g *GlobalV2) GetRevision() int

func (*GlobalV2) GetStartHeight

func (g *GlobalV2) GetStartHeight() int64

func (*GlobalV2) GetTermPeriod

func (g *GlobalV2) GetTermPeriod() int

func (*GlobalV2) GetV1

func (g *GlobalV2) GetV1() *GlobalV1

func (*GlobalV2) GetV2

func (g *GlobalV2) GetV2() *GlobalV2

func (*GlobalV2) GetV3 added in v1.4.0

func (g *GlobalV2) GetV3() *GlobalV3

func (*GlobalV2) RLPDecodeFields

func (g *GlobalV2) RLPDecodeFields(decoder codec.Decoder) error

func (*GlobalV2) RLPEncodeFields

func (g *GlobalV2) RLPEncodeFields(encoder codec.Encoder) error

func (*GlobalV2) String

func (g *GlobalV2) String() string

func (*GlobalV2) Version

func (g *GlobalV2) Version() int

type GlobalV3 added in v1.4.0

type GlobalV3 struct {
	// contains filtered or unexported fields
}

GlobalV3 global struct for icstate.IISSVersion4

func NewGlobalV3 added in v1.4.0

func NewGlobalV3(
	iissVersion int, startHeight int64, revision int, offsetLimit, electedPRepCount int,
	bondRequirement icmodule.Rate, rFund *icstate.RewardFund, minBond *big.Int,
) *GlobalV3

func (*GlobalV3) Equal added in v1.4.0

func (g *GlobalV3) Equal(impl icobject.Impl) bool

func (*GlobalV3) Format added in v1.4.0

func (g *GlobalV3) Format(f fmt.State, c rune)

func (*GlobalV3) GetBondRequirement added in v1.4.0

func (g *GlobalV3) GetBondRequirement() icmodule.Rate

func (*GlobalV3) GetElectedPRepCount added in v1.4.0

func (g *GlobalV3) GetElectedPRepCount() int

func (*GlobalV3) GetICps added in v1.4.0

func (g *GlobalV3) GetICps() icmodule.Rate

func (*GlobalV3) GetIGlobal added in v1.4.0

func (g *GlobalV3) GetIGlobal() *big.Int

func (*GlobalV3) GetIISSVersion added in v1.4.0

func (g *GlobalV3) GetIISSVersion() int

func (*GlobalV3) GetIPRep added in v1.4.0

func (g *GlobalV3) GetIPRep() icmodule.Rate

func (*GlobalV3) GetIRelay added in v1.4.0

func (g *GlobalV3) GetIRelay() icmodule.Rate

func (*GlobalV3) GetIWage added in v1.4.0

func (g *GlobalV3) GetIWage() icmodule.Rate

func (*GlobalV3) GetOffsetLimit added in v1.4.0

func (g *GlobalV3) GetOffsetLimit() int

func (*GlobalV3) GetRevision added in v1.4.0

func (g *GlobalV3) GetRevision() int

func (*GlobalV3) GetRewardFundAmountByKey added in v1.4.0

func (g *GlobalV3) GetRewardFundAmountByKey(key icstate.RFundKey) *big.Int

func (*GlobalV3) GetRewardFundRateByKey added in v1.4.0

func (g *GlobalV3) GetRewardFundRateByKey(key icstate.RFundKey) icmodule.Rate

func (*GlobalV3) GetStartHeight added in v1.4.0

func (g *GlobalV3) GetStartHeight() int64

func (*GlobalV3) GetTermPeriod added in v1.4.0

func (g *GlobalV3) GetTermPeriod() int

func (*GlobalV3) GetV1 added in v1.4.0

func (g *GlobalV3) GetV1() *GlobalV1

func (*GlobalV3) GetV2 added in v1.4.0

func (g *GlobalV3) GetV2() *GlobalV2

func (*GlobalV3) GetV3 added in v1.4.0

func (g *GlobalV3) GetV3() *GlobalV3

func (*GlobalV3) MinBond added in v1.4.0

func (g *GlobalV3) MinBond() *big.Int

func (*GlobalV3) RLPDecodeFields added in v1.4.0

func (g *GlobalV3) RLPDecodeFields(decoder codec.Decoder) error

func (*GlobalV3) RLPEncodeFields added in v1.4.0

func (g *GlobalV3) RLPEncodeFields(encoder codec.Encoder) error

func (*GlobalV3) String added in v1.4.0

func (g *GlobalV3) String() string

func (*GlobalV3) Version added in v1.4.0

func (g *GlobalV3) Version() int

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) Equal

func (ic *IScoreClaim) Equal(impl icobject.Impl) bool

func (*IScoreClaim) Format added in v0.9.7

func (ic *IScoreClaim) Format(f fmt.State, c rune)

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 NewSnapshot

func NewSnapshot(database db.Database, hash []byte) *Snapshot

func NewSnapshotWithBuilder

func NewSnapshotWithBuilder(builder merkle.Builder, hash []byte) *Snapshot

func (*Snapshot) Bytes

func (ss *Snapshot) Bytes() []byte

func (*Snapshot) Filter

func (ss *Snapshot) Filter(prefix []byte) trie.IteratorForObject

func (*Snapshot) Flush

func (ss *Snapshot) Flush() error

func (*Snapshot) GetBlockProduce

func (ss *Snapshot) GetBlockProduce(offset int) (*BlockProduce, error)

func (*Snapshot) GetGlobal

func (ss *Snapshot) GetGlobal() (Global, error)

func (*Snapshot) GetValidators added in v0.9.7

func (ss *Snapshot) GetValidators() (ret []module.Address, err error)

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState(database db.Database) *State

func NewStateFromSnapshot

func NewStateFromSnapshot(ss *Snapshot) *State

func (*State) AddBTPDSA added in v1.3.0

func (s *State) AddBTPDSA(offset int, index int, value int) error

func (*State) AddBTPPublicKey added in v1.3.0

func (s *State) AddBTPPublicKey(offset int, index int, from module.Address, value int) error

func (*State) AddBlockProduce

func (s *State) AddBlockProduce(blockHeight int64, proposer module.Address, voters []module.Address) error

func (*State) AddCommissionRate added in v1.4.0

func (s *State) AddCommissionRate(addr module.Address, value icmodule.Rate) error

func (*State) AddEventBond

func (s *State) AddEventBond(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)

func (*State) AddEventDelegated added in v0.9.10

func (s *State) AddEventDelegated(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)

func (*State) AddEventDelegation

func (s *State) AddEventDelegation(offset int, from module.Address, votes VoteList) (int64, *icobject.Object, error)

func (*State) AddEventDelegationV2 added in v0.9.10

func (s *State) AddEventDelegationV2(offset int, from module.Address, delegated VoteList, delegating VoteList) (int64, *icobject.Object, error)

func (*State) AddEventEnable

func (s *State) AddEventEnable(offset int, target module.Address, status icmodule.EnableStatus) (int64, error)

func (*State) AddEventVotedReward added in v0.9.8

func (s *State) AddEventVotedReward(offset int) (int64, error)

func (*State) AddGlobalV1

func (s *State) AddGlobalV1(revision int, startHeight int64, offsetLimit int, irep *big.Int, rrep *big.Int,
	mainPRepCount int, electedPRepCount int,
) error

func (*State) AddGlobalV2

func (s *State) AddGlobalV2(revision int, startHeight int64, offsetLimit int, iglobal *big.Int,
	iprep, ivoter, icps, irelay icmodule.Rate,
	electedPRepCount int, bondRequirement icmodule.Rate,
) error

func (*State) AddGlobalV3 added in v1.4.0

func (s *State) AddGlobalV3(startHeight int64, revision, offsetLimit, electedPRepCount int, bondRequirement icmodule.Rate,
	rFund *icstate.RewardFund, minBond *big.Int,
) error

func (*State) AddIScoreClaim

func (s *State) AddIScoreClaim(addr module.Address, amount *big.Int) (*IScoreClaim, error)

func (*State) ClearCache added in v0.9.7

func (s *State) ClearCache()

func (*State) GetCommissionRate added in v1.4.0

func (s *State) GetCommissionRate(addr module.Address) (*CommissionRate, error)

func (*State) GetEvent added in v0.9.10

func (s *State) GetEvent(offset int, index int64) (*icobject.Object, error)

func (*State) GetGlobal added in v0.9.7

func (s *State) GetGlobal() (Global, error)

func (*State) GetIScoreClaim

func (s *State) GetIScoreClaim(addr module.Address) (*IScoreClaim, error)

func (*State) GetSnapshot

func (s *State) GetSnapshot() *Snapshot

func (*State) Reset

func (s *State) Reset(ss *Snapshot)

func (*State) ResetEventSize added in v0.9.7

func (s *State) ResetEventSize() error

type Vote

type Vote struct {
	// contains filtered or unexported fields
}

func NewVote

func NewVote(address *common.Address, value *big.Int) *Vote

func (*Vote) Amount

func (v *Vote) Amount() *big.Int

func (*Vote) Clone

func (v *Vote) Clone() *Vote

func (*Vote) Equal

func (v *Vote) Equal(v2 *Vote) bool

func (*Vote) Format added in v0.9.7

func (v *Vote) Format(f fmt.State, c rune)

func (*Vote) RLPDecodeSelf added in v0.9.7

func (v *Vote) RLPDecodeSelf(decoder codec.Decoder) error

func (*Vote) RLPEncodeSelf added in v0.9.7

func (v *Vote) RLPEncodeSelf(encoder codec.Encoder) error

func (*Vote) SetAmount added in v0.9.7

func (v *Vote) SetAmount(amount *big.Int)

func (*Vote) To

func (v *Vote) To() module.Address

type VoteList

type VoteList []*Vote

func (VoteList) Clone

func (vl VoteList) Clone() VoteList

func (*VoteList) Delete

func (vl *VoteList) Delete(i int) error

func (VoteList) Equal

func (vl VoteList) Equal(vl2 VoteList) bool

func (VoteList) Has added in v0.9.7

func (vl VoteList) Has() bool

func (VoteList) ToMap added in v0.9.7

func (vl VoteList) ToMap() map[string]*Vote

func (*VoteList) Update

func (vl *VoteList) Update(vl2 VoteList)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL