Documentation ¶
Index ¶
- Variables
- type Storage
- func (s *Storage) AddCulprits(culprits []string)
- func (s *Storage) ClearNodeMissedBatchBitArray(address common.Address)
- func (s *Storage) Close() error
- func (s *Storage) GetByElectionId(electionId uint64) (types.CpkData, error)
- func (s *Storage) GetCulprits() []string
- func (s *Storage) GetIndexStateBatch(index uint64) (bool, [32]byte)
- func (s *Storage) GetNodeMissedBatchBitArray(address common.Address, index uint64) bool
- func (s *Storage) GetScannedHeight() (uint64, error)
- func (s *Storage) GetSigningInfo(address common.Address) (bool, slash.SigningInfo)
- func (s *Storage) GetSlashingInfo(address common.Address, batchIndex uint64) (bool, slash.SlashingInfo)
- func (s *Storage) GetStateBatch(root [32]byte) (bool, index.StateBatchInfo)
- func (s *Storage) IndexStateBatch(index uint64, root [32]byte) error
- func (s *Storage) Insert(cpkData types.CpkData) error
- func (s *Storage) IsInSlashing(address common.Address) bool
- func (s *Storage) ListSlashingInfo() (slashingInfos []slash.SlashingInfo)
- func (s *Storage) RemoveSlashingInfo(address common.Address, batchIndex uint64)
- func (s *Storage) ResetScanHeight(height uint64) error
- func (s *Storage) SetNodeMissedBatchBitArray(address common.Address, index uint64, missed bool)
- func (s *Storage) SetSigningInfo(signingInfo slash.SigningInfo)
- func (s *Storage) SetSlashingInfo(slashingInfo slash.SlashingInfo)
- func (s *Storage) SetStateBatch(info index.StateBatchInfo) error
- func (s *Storage) UpdateHeight(height uint64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CPKDataKeyPrefix = []byte{0x01} StateBatchKeyPrefix = []byte{0x02} IndexStateBatchKeyPrefix = []byte{0x03} SigningInfoKeyPrefix = []byte{0x04} NodeMissedBatchBitArrayKeyPrefix = []byte{0x05} SlashingInfoKeyPrefix = []byte{0x06} ScannedHeightKeyPrefix = []byte{0x07} CulpritsKeyPrefix = []byte{0x08} )
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) AddCulprits ¶
func (*Storage) ClearNodeMissedBatchBitArray ¶
func (*Storage) GetByElectionId ¶
func (*Storage) GetCulprits ¶
func (*Storage) GetIndexStateBatch ¶
func (*Storage) GetNodeMissedBatchBitArray ¶
func (*Storage) GetScannedHeight ¶
func (*Storage) GetSigningInfo ¶
func (*Storage) GetSlashingInfo ¶
func (*Storage) GetStateBatch ¶
func (s *Storage) GetStateBatch(root [32]byte) (bool, index.StateBatchInfo)
func (*Storage) IndexStateBatch ¶
func (*Storage) ListSlashingInfo ¶
func (s *Storage) ListSlashingInfo() (slashingInfos []slash.SlashingInfo)
func (*Storage) RemoveSlashingInfo ¶
func (*Storage) ResetScanHeight ¶
func (*Storage) SetNodeMissedBatchBitArray ¶
func (*Storage) SetSigningInfo ¶
func (s *Storage) SetSigningInfo(signingInfo slash.SigningInfo)
func (*Storage) SetSlashingInfo ¶
func (s *Storage) SetSlashingInfo(slashingInfo slash.SlashingInfo)
func (*Storage) SetStateBatch ¶
func (s *Storage) SetStateBatch(info index.StateBatchInfo) error
func (*Storage) UpdateHeight ¶
Click to show internal directories.
Click to hide internal directories.