Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DelegationIDSize is size of DelegationID serialized object
DelegationIDSize = 20 + 4
)
Variables ¶
View Source
var ( // ForkBit is set if staker has a confirmed pair of fork events ForkBit = uint64(1) // OfflineBit is set if staker has didn't have confirmed events for a long time OfflineBit = uint64(1 << 8) // CheaterMask is a combination of severe misbehavings CheaterMask = ForkBit )
Functions ¶
This section is empty.
Types ¶
type DelegationID ¶
DelegationID is a pair of delegator address and staker ID to which delegation is applied
func BytesToDelegationID ¶
func BytesToDelegationID(bb []byte) DelegationID
func (*DelegationID) Bytes ¶
func (id *DelegationID) Bytes() []byte
type EpochStats ¶
type EpochStats struct { Start inter.Timestamp End inter.Timestamp TotalFee *big.Int Epoch idx.Epoch `rlp:"-"` // API-only field TotalBaseRewardWeight *big.Int `rlp:"-"` // API-only field TotalTxRewardWeight *big.Int `rlp:"-"` // API-only field }
EpochStats stores general statistics for an epoch
func (*EpochStats) Duration ¶
func (s *EpochStats) Duration() inter.Timestamp
Duration returns epoch duration
type SfcDelegation ¶
type SfcDelegation struct { CreatedEpoch idx.Epoch CreatedTime inter.Timestamp DeactivatedEpoch idx.Epoch DeactivatedTime inter.Timestamp Amount *big.Int }
SfcDelegation is the node-side representation of SFC delegation
type SfcDelegationAndID ¶
type SfcDelegationAndID struct { Delegation *SfcDelegation ID DelegationID }
SfcDelegationAndID is pair SfcDelegation + address
type SfcStaker ¶
type SfcStaker struct { CreatedEpoch idx.Epoch CreatedTime inter.Timestamp DeactivatedEpoch idx.Epoch DeactivatedTime inter.Timestamp StakeAmount *big.Int DelegatedMe *big.Int Address common.Address Status uint64 IsValidator bool `rlp:"-"` // API-only field }
SfcStaker is the node-side representation of SFC staker
func (*SfcStaker) CalcTotalStake ¶
CalcTotalStake returns sum of staker's stake and delegated to staker stake
type SfcStakerAndID ¶
SfcStakerAndID is pair SfcStaker + StakerID
Click to show internal directories.
Click to hide internal directories.