Versions in this module Expand all Collapse all v1 v1.0.2 Jan 31, 2023 v1.0.1 Jan 25, 2023 Changes in this version + const DelegationIDSize + var CheaterMask = ForkBit + var ForkBit = uint64(1) + var OfflineBit = uint64(1 << 8) + var Topics = struct{ ... } + func ApplyGenesis(s *Store, index *topicsdb.Index) + func OnNewLog(s *Store, l *types.Log) + type DelegationID struct + Delegator common.Address + StakerID idx.ValidatorID + func BytesToDelegationID(bb []byte) DelegationID + func (id *DelegationID) Bytes() []byte + type EpochStats struct + End inter.Timestamp + Epoch idx.Epoch + Start inter.Timestamp + TotalBaseRewardWeight *big.Int + TotalFee *big.Int + TotalTxRewardWeight *big.Int + func (s *EpochStats) Duration() inter.Timestamp + type SfcDelegation struct + Amount *big.Int + CreatedEpoch idx.Epoch + CreatedTime inter.Timestamp + DeactivatedEpoch idx.Epoch + DeactivatedTime inter.Timestamp + type SfcDelegationAndID struct + Delegation *SfcDelegation + ID DelegationID + type SfcStaker struct + Address common.Address + CreatedEpoch idx.Epoch + CreatedTime inter.Timestamp + DeactivatedEpoch idx.Epoch + DeactivatedTime inter.Timestamp + DelegatedMe *big.Int + IsValidator bool + StakeAmount *big.Int + Status uint64 + func (s *SfcStaker) CalcTotalStake() *big.Int + func (s *SfcStaker) HasFork() bool + func (s *SfcStaker) IsCheater() bool + func (s *SfcStaker) Offline() bool + func (s *SfcStaker) Ok() bool + type SfcStakerAndID struct + Staker *SfcStaker + StakerID idx.ValidatorID + type Store struct + func NewStore(mainDB kvdb.Store) *Store + func (s *Store) Close() + func (s *Store) DelSfcDelegation(id DelegationID) + func (s *Store) DelSfcStaker(stakerID idx.ValidatorID) + func (s *Store) ForEachSfcDelegation(do func(SfcDelegationAndID)) + func (s *Store) ForEachSfcStaker(do func(SfcStakerAndID)) + func (s *Store) GetDelegationClaimedRewards(id DelegationID) *big.Int + func (s *Store) GetEpochValidators(epoch idx.Epoch) []SfcStakerAndID + func (s *Store) GetSfcDelegation(id DelegationID) *SfcDelegation + func (s *Store) GetSfcDelegationsByAddr(addr common.Address, limit int) []SfcDelegationAndID + func (s *Store) GetSfcStaker(stakerID idx.ValidatorID) *SfcStaker + func (s *Store) GetSfcStakers() []SfcStakerAndID + func (s *Store) GetStakerDelegationsClaimedRewards(stakerID idx.ValidatorID) *big.Int + func (s *Store) HasEpochValidator(epoch idx.Epoch, stakerID idx.ValidatorID) bool + func (s *Store) HasSfcStaker(stakerID idx.ValidatorID) bool + func (s *Store) IncDelegationClaimedRewards(id DelegationID, diff *big.Int) + func (s *Store) IncStakerDelegationsClaimedRewards(stakerID idx.ValidatorID, diff *big.Int) + func (s *Store) SetDelegationClaimedRewards(id DelegationID, amount *big.Int) + func (s *Store) SetEpochValidators(epoch idx.Epoch, vv []SfcStakerAndID) + func (s *Store) SetSfcDelegation(id DelegationID, v *SfcDelegation) + func (s *Store) SetSfcStaker(stakerID idx.ValidatorID, v *SfcStaker) + func (s *Store) SetStakerDelegationsClaimedRewards(stakerID idx.ValidatorID, amount *big.Int)