Documentation ¶
Overview ¶
Package chain_state is a generated GoMock package.
Index ¶
- Constants
- type Chain
- type Consensus
- type FlushingBatch
- type LogItem
- type MemPool
- type MockChain
- func (m *MockChain) EXPECT() *MockChainMockRecorder
- func (m *MockChain) GetAccountBlockByHash(blockHash types.Hash) (*core.AccountBlock, error)
- func (m *MockChain) GetLatestSnapshotBlock() *core.SnapshotBlock
- func (m *MockChain) GetSnapshotHeaderBeforeTime(timestamp *time.Time) (*core.SnapshotBlock, error)
- func (m *MockChain) GetSnapshotHeaderByHeight(height uint64) (*core.SnapshotBlock, error)
- func (m *MockChain) GetSnapshotHeadersAfterOrEqualTime(endHashHeight *core.HashHeight, startTime *time.Time, producer *types.Address) ([]*core.SnapshotBlock, error)
- func (m *MockChain) GetSnapshotHeightByHash(hash types.Hash) (uint64, error)
- func (m *MockChain) GetUnconfirmedBlocks(addr types.Address) []*core.AccountBlock
- func (m *MockChain) IterateAccounts(iterateFunc func(types.Address, uint64, error) bool)
- func (m *MockChain) QueryLatestSnapshotBlock() (*core.SnapshotBlock, error)
- func (m *MockChain) RecoverWrite()
- func (m *MockChain) StopWrite()
- type MockChainMockRecorder
- func (mr *MockChainMockRecorder) GetAccountBlockByHash(blockHash interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetLatestSnapshotBlock() *gomock.Call
- func (mr *MockChainMockRecorder) GetSnapshotHeaderBeforeTime(timestamp interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSnapshotHeaderByHeight(height interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSnapshotHeadersAfterOrEqualTime(endHashHeight, startTime, producer interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSnapshotHeightByHash(hash interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetUnconfirmedBlocks(addr interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) IterateAccounts(iterateFunc interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) QueryLatestSnapshotBlock() *gomock.Call
- func (mr *MockChainMockRecorder) RecoverWrite() *gomock.Call
- func (mr *MockChainMockRecorder) StopWrite() *gomock.Call
- type MockConsensus
- type MockConsensusMockRecorder
- type MockRedoInterface
- func (m *MockRedoInterface) AddLog(addr types.Address, log LogItem)
- func (m *MockRedoInterface) Close() error
- func (m *MockRedoInterface) EXPECT() *MockRedoInterfaceMockRecorder
- func (m *MockRedoInterface) HasRedo(snapshotHeight uint64) (bool, error)
- func (m *MockRedoInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, confirmedBlocks []*core.AccountBlock)
- func (m *MockRedoInterface) QueryLog(snapshotHeight uint64) (SnapshotLog, bool, error)
- func (m *MockRedoInterface) Rollback(chunks []*core.SnapshotChunk)
- func (m *MockRedoInterface) SetCurrentSnapshot(snapshotHeight uint64, logMap SnapshotLog)
- type MockRedoInterfaceMockRecorder
- func (mr *MockRedoInterfaceMockRecorder) AddLog(addr, log interface{}) *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) Close() *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) HasRedo(snapshotHeight interface{}) *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, confirmedBlocks interface{}) *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) QueryLog(snapshotHeight interface{}) *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) Rollback(chunks interface{}) *gomock.Call
- func (mr *MockRedoInterfaceMockRecorder) SetCurrentSnapshot(snapshotHeight, logMap interface{}) *gomock.Call
- type MockRoundCacheInterface
- func (m *MockRoundCacheInterface) DeleteSnapshotBlocks(snapshotBlocks []*core.SnapshotBlock) error
- func (m *MockRoundCacheInterface) EXPECT() *MockRoundCacheInterfaceMockRecorder
- func (m *MockRoundCacheInterface) GetSnapshotViteBalanceList(snapshotHash types.Hash, addrList []types.Address) (map[types.Address]*big.Int, []types.Address, error)
- func (m *MockRoundCacheInterface) Init(timeIndex core0.TimeIndex) error
- func (m *MockRoundCacheInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, snapshotLog SnapshotLog) error
- func (m *MockRoundCacheInterface) StorageIterator(snapshotHash types.Hash) interfaces.StorageIterator
- type MockRoundCacheInterfaceMockRecorder
- func (mr *MockRoundCacheInterfaceMockRecorder) DeleteSnapshotBlocks(snapshotBlocks interface{}) *gomock.Call
- func (mr *MockRoundCacheInterfaceMockRecorder) GetSnapshotViteBalanceList(snapshotHash, addrList interface{}) *gomock.Call
- func (mr *MockRoundCacheInterfaceMockRecorder) Init(timeIndex interface{}) *gomock.Call
- func (mr *MockRoundCacheInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, snapshotLog interface{}) *gomock.Call
- func (mr *MockRoundCacheInterfaceMockRecorder) StorageIterator(snapshotHash interface{}) *gomock.Call
- type MockStateDBInterface
- func (m *MockStateDBInterface) Close() error
- func (m *MockStateDBInterface) EXPECT() *MockStateDBInterfaceMockRecorder
- func (m *MockStateDBInterface) GetBalance(addr types.Address, tokenTypeId types.TokenTypeId) (*big.Int, error)
- func (m *MockStateDBInterface) GetBalanceMap(addr types.Address) (map[types.TokenTypeId]*big.Int, error)
- func (m *MockStateDBInterface) GetCallDepth(sendBlockHash *types.Hash) (uint16, error)
- func (m *MockStateDBInterface) GetCode(addr types.Address) ([]byte, error)
- func (m *MockStateDBInterface) GetContractList(gid *types.Gid) ([]types.Address, error)
- func (m *MockStateDBInterface) GetContractMeta(addr types.Address) (*core.ContractMeta, error)
- func (m *MockStateDBInterface) GetSnapshotBalanceList(balanceMap map[types.Address]*big.Int, snapshotBlockHash types.Hash, ...) error
- func (m *MockStateDBInterface) GetSnapshotValue(snapshotBlockHeight uint64, addr types.Address, key []byte) ([]byte, error)
- func (m *MockStateDBInterface) GetStatus() []interfaces.DBStatus
- func (m *MockStateDBInterface) GetStorageValue(addr *types.Address, key []byte) ([]byte, error)
- func (m *MockStateDBInterface) GetVmLogList(logHash *types.Hash) (core.VmLogList, error)
- func (m *MockStateDBInterface) HasContractMeta(addr types.Address) (bool, error)
- func (m *MockStateDBInterface) Init() error
- func (m *MockStateDBInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, confirmedBlocks []*core.AccountBlock) error
- func (m *MockStateDBInterface) IterateContracts(iterateFunc func(types.Address, *core.ContractMeta, error) bool)
- func (m *MockStateDBInterface) NewRawSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) interfaces.StorageIterator
- func (m *MockStateDBInterface) NewSnapshotStorageIterator(snapshotHash types.Hash, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
- func (m *MockStateDBInterface) NewSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
- func (m *MockStateDBInterface) NewStorageDatabase(snapshotHash types.Hash, addr types.Address) (StorageDatabaseInterface, error)
- func (m *MockStateDBInterface) NewStorageIterator(addr types.Address, prefix []byte) interfaces.StorageIterator
- func (m *MockStateDBInterface) Redo() RedoInterface
- func (m *MockStateDBInterface) RedoStore() *db.Store
- func (m *MockStateDBInterface) RollbackAccountBlocks(accountBlocks []*core.AccountBlock) error
- func (m *MockStateDBInterface) RollbackSnapshotBlocks(deletedSnapshotSegments []*core.SnapshotChunk, ...) error
- func (m *MockStateDBInterface) SetCacheLevelForConsensus(level uint32)
- func (m *MockStateDBInterface) SetTimeIndex(periodTimeIndex interfaces.TimeIndex) error
- func (m *MockStateDBInterface) Store() *db.Store
- func (m *MockStateDBInterface) Write(block *interfaces.VmAccountBlock) error
- func (m *MockStateDBInterface) WriteByRedo(blockHash types.Hash, addr types.Address, redoLog LogItem)
- type MockStateDBInterfaceMockRecorder
- func (mr *MockStateDBInterfaceMockRecorder) Close() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetBalance(addr, tokenTypeId interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetBalanceMap(addr interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetCallDepth(sendBlockHash interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetCode(addr interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetContractList(gid interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetContractMeta(addr interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetSnapshotBalanceList(balanceMap, snapshotBlockHash, addrList, tokenId interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetSnapshotValue(snapshotBlockHeight, addr, key interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetStatus() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetStorageValue(addr, key interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) GetVmLogList(logHash interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) HasContractMeta(addr interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) Init() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, confirmedBlocks interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) IterateContracts(iterateFunc interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) NewRawSnapshotStorageIteratorByHeight(snapshotHeight, addr, prefix interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) NewSnapshotStorageIterator(snapshotHash, addr, prefix interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) NewSnapshotStorageIteratorByHeight(snapshotHeight, addr, prefix interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) NewStorageDatabase(snapshotHash, addr interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) NewStorageIterator(addr, prefix interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) Redo() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) RedoStore() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) RollbackAccountBlocks(accountBlocks interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) RollbackSnapshotBlocks(deletedSnapshotSegments, newUnconfirmedBlocks interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) SetCacheLevelForConsensus(level interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) SetTimeIndex(periodTimeIndex interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) Store() *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) Write(block interface{}) *gomock.Call
- func (mr *MockStateDBInterfaceMockRecorder) WriteByRedo(blockHash, addr, redoLog interface{}) *gomock.Call
- type MockStorageDatabaseInterface
- func (m *MockStorageDatabaseInterface) Address() *types.Address
- func (m *MockStorageDatabaseInterface) EXPECT() *MockStorageDatabaseInterfaceMockRecorder
- func (m *MockStorageDatabaseInterface) GetValue(key []byte) ([]byte, error)
- func (m *MockStorageDatabaseInterface) NewStorageIterator(prefix []byte) (interfaces.StorageIterator, error)
- type MockStorageDatabaseInterfaceMockRecorder
- type MockTimeIndex
- type MockTimeIndexMockRecorder
- type Redo
- func (redo *Redo) AddLog(addr types.Address, log LogItem)
- func (redo *Redo) Close() error
- func (redo *Redo) HasRedo(snapshotHeight uint64) (bool, error)
- func (redo *Redo) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock)
- func (redo *Redo) QueryLog(snapshotHeight uint64) (SnapshotLog, bool, error)
- func (redo *Redo) Rollback(chunks []*ledger.SnapshotChunk)
- func (redo *Redo) SetCurrentSnapshot(snapshotHeight uint64, logMap SnapshotLog)
- type RedoCache
- func (redoCache *RedoCache) AddLog(addr types.Address, log LogItem)
- func (redoCache *RedoCache) Current() SnapshotLog
- func (redoCache *RedoCache) Delete(snapshotHeight uint64)
- func (redoCache *RedoCache) Get(snapshotHeight uint64) (SnapshotLog, bool)
- func (redoCache *RedoCache) Init(currentHeight uint64)
- func (redoCache *RedoCache) Set(snapshotHeight uint64, snapshotLog SnapshotLog)
- func (redoCache *RedoCache) SetCurrent(snapshotHeight uint64, snapshotLog SnapshotLog)
- type RedoCacheData
- type RedoInterface
- type RoundCache
- func (cache *RoundCache) DeleteSnapshotBlocks(snapshotBlocks []*ledger.SnapshotBlock) error
- func (cache *RoundCache) GetSnapshotViteBalanceList(snapshotHash types.Hash, addrList []types.Address) (map[types.Address]*big.Int, []types.Address, error)
- func (cache *RoundCache) Init(timeIndex interfaces.TimeIndex) (returnErr error)
- func (cache *RoundCache) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, snapshotLog SnapshotLog) (returnErr error)
- func (cache *RoundCache) StorageIterator(snapshotHash types.Hash) interfaces.StorageIterator
- type RoundCacheInterface
- type RoundCacheLogItem
- type RoundCacheRedoLogs
- type RoundCacheSnapshotLog
- type SnapshotLog
- type StateDB
- func (sDB *StateDB) Close() error
- func (sDB *StateDB) GetBalance(addr types.Address, tokenTypeId types.TokenTypeId) (*big.Int, error)
- func (sDB *StateDB) GetBalanceMap(addr types.Address) (map[types.TokenTypeId]*big.Int, error)
- func (sDB *StateDB) GetCallDepth(sendBlockHash *types.Hash) (uint16, error)
- func (sDB *StateDB) GetCode(addr types.Address) ([]byte, error)
- func (sDB *StateDB) GetContractList(gid *types.Gid) ([]types.Address, error)
- func (sDB *StateDB) GetContractMeta(addr types.Address) (*ledger.ContractMeta, error)
- func (sDB *StateDB) GetSnapshotBalanceList(balanceMap map[types.Address]*big.Int, snapshotBlockHash types.Hash, ...) error
- func (sDB *StateDB) GetSnapshotValue(snapshotBlockHeight uint64, addr types.Address, key []byte) ([]byte, error)
- func (sDB *StateDB) GetStatus() []interfaces.DBStatus
- func (sDB *StateDB) GetStorageValue(addr *types.Address, key []byte) ([]byte, error)
- func (sDB *StateDB) GetVmLogList(logHash *types.Hash) (ledger.VmLogList, error)
- func (sDB *StateDB) HasContractMeta(addr types.Address) (bool, error)
- func (sDB *StateDB) Init() error
- func (sDB *StateDB) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock) error
- func (sDB *StateDB) IterateContracts(...)
- func (sDB *StateDB) NewRawSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) interfaces.StorageIterator
- func (sDB *StateDB) NewSnapshotStorageIterator(snapshotHash types.Hash, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
- func (sDB *StateDB) NewSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
- func (sDB *StateDB) NewStorageDatabase(snapshotHash types.Hash, addr types.Address) (StorageDatabaseInterface, error)
- func (sDB *StateDB) NewStorageIterator(addr types.Address, prefix []byte) interfaces.StorageIterator
- func (sDB *StateDB) Redo() RedoInterface
- func (sDB *StateDB) RedoStore() *chain_db.Store
- func (sDB *StateDB) RollbackAccountBlocks(accountBlocks []*ledger.AccountBlock) error
- func (sDB *StateDB) RollbackSnapshotBlocks(deletedSnapshotSegments []*ledger.SnapshotChunk, ...) error
- func (sDB *StateDB) SetCacheLevelForConsensus(level uint32)
- func (sDB *StateDB) SetTimeIndex(periodTimeIndex interfaces.TimeIndex) error
- func (sDB *StateDB) Store() *chain_db.Store
- func (sDB *StateDB) Write(block *interfaces.VmAccountBlock) error
- func (sDB *StateDB) WriteByRedo(blockHash types.Hash, addr types.Address, redoLog LogItem)
- type StateDBInterface
- type StorageDatabase
- type StorageDatabaseInterface
- type TimeIndex
- type TransformIterator
- func (rcIter *TransformIterator) Error() error
- func (rcIter *TransformIterator) Key() []byte
- func (rcIter *TransformIterator) Last() bool
- func (rcIter *TransformIterator) Next() bool
- func (rcIter *TransformIterator) Prev() bool
- func (rcIter *TransformIterator) Release()
- func (rcIter *TransformIterator) Seek(key []byte) bool
- func (rcIter *TransformIterator) Value() []byte
Constants ¶
const ( STOP = 0 INITED = 1 )
const ( ConsensusNoCache = 0 ConsensusReadCache = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain interface { IterateAccounts(iterateFunc func(addr types.Address, accountId uint64, err error) bool) QueryLatestSnapshotBlock() (*ledger.SnapshotBlock, error) GetLatestSnapshotBlock() *ledger.SnapshotBlock GetSnapshotHeightByHash(hash types.Hash) (uint64, error) GetUnconfirmedBlocks(addr types.Address) []*ledger.AccountBlock GetAccountBlockByHash(blockHash types.Hash) (*ledger.AccountBlock, error) GetSnapshotHeaderBeforeTime(timestamp *time.Time) (*ledger.SnapshotBlock, error) GetSnapshotHeadersAfterOrEqualTime(endHashHeight *ledger.HashHeight, startTime *time.Time, producer *types.Address) ([]*ledger.SnapshotBlock, error) // header without snapshot content GetSnapshotHeaderByHeight(height uint64) (*ledger.SnapshotBlock, error) StopWrite() RecoverWrite() }
type Consensus ¶
type Consensus interface { VerifyAccountProducer(block *ledger.AccountBlock) (bool, error) SBPReader() core.SBPStatReader }
type FlushingBatch ¶
type MemPool ¶
type MemPool struct {
// contains filtered or unexported fields
}
func NewMemPool ¶
func (*MemPool) GetByteSlice ¶
func (*MemPool) GetIntSlice ¶
type MockChain ¶ added in v2.11.3
type MockChain struct {
// contains filtered or unexported fields
}
MockChain is a mock of Chain interface.
func NewMockChain ¶ added in v2.11.3
func NewMockChain(ctrl *gomock.Controller) *MockChain
NewMockChain creates a new mock instance.
func (*MockChain) EXPECT ¶ added in v2.11.3
func (m *MockChain) EXPECT() *MockChainMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockChain) GetAccountBlockByHash ¶ added in v2.11.3
GetAccountBlockByHash mocks base method.
func (*MockChain) GetLatestSnapshotBlock ¶ added in v2.11.3
func (m *MockChain) GetLatestSnapshotBlock() *core.SnapshotBlock
GetLatestSnapshotBlock mocks base method.
func (*MockChain) GetSnapshotHeaderBeforeTime ¶ added in v2.11.3
GetSnapshotHeaderBeforeTime mocks base method.
func (*MockChain) GetSnapshotHeaderByHeight ¶ added in v2.11.3
func (m *MockChain) GetSnapshotHeaderByHeight(height uint64) (*core.SnapshotBlock, error)
GetSnapshotHeaderByHeight mocks base method.
func (*MockChain) GetSnapshotHeadersAfterOrEqualTime ¶ added in v2.11.3
func (m *MockChain) GetSnapshotHeadersAfterOrEqualTime(endHashHeight *core.HashHeight, startTime *time.Time, producer *types.Address) ([]*core.SnapshotBlock, error)
GetSnapshotHeadersAfterOrEqualTime mocks base method.
func (*MockChain) GetSnapshotHeightByHash ¶ added in v2.11.3
GetSnapshotHeightByHash mocks base method.
func (*MockChain) GetUnconfirmedBlocks ¶ added in v2.11.3
func (m *MockChain) GetUnconfirmedBlocks(addr types.Address) []*core.AccountBlock
GetUnconfirmedBlocks mocks base method.
func (*MockChain) IterateAccounts ¶ added in v2.11.3
IterateAccounts mocks base method.
func (*MockChain) QueryLatestSnapshotBlock ¶ added in v2.11.3
func (m *MockChain) QueryLatestSnapshotBlock() (*core.SnapshotBlock, error)
QueryLatestSnapshotBlock mocks base method.
func (*MockChain) RecoverWrite ¶ added in v2.11.3
func (m *MockChain) RecoverWrite()
RecoverWrite mocks base method.
type MockChainMockRecorder ¶ added in v2.11.3
type MockChainMockRecorder struct {
// contains filtered or unexported fields
}
MockChainMockRecorder is the mock recorder for MockChain.
func (*MockChainMockRecorder) GetAccountBlockByHash ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetAccountBlockByHash(blockHash interface{}) *gomock.Call
GetAccountBlockByHash indicates an expected call of GetAccountBlockByHash.
func (*MockChainMockRecorder) GetLatestSnapshotBlock ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetLatestSnapshotBlock() *gomock.Call
GetLatestSnapshotBlock indicates an expected call of GetLatestSnapshotBlock.
func (*MockChainMockRecorder) GetSnapshotHeaderBeforeTime ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetSnapshotHeaderBeforeTime(timestamp interface{}) *gomock.Call
GetSnapshotHeaderBeforeTime indicates an expected call of GetSnapshotHeaderBeforeTime.
func (*MockChainMockRecorder) GetSnapshotHeaderByHeight ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetSnapshotHeaderByHeight(height interface{}) *gomock.Call
GetSnapshotHeaderByHeight indicates an expected call of GetSnapshotHeaderByHeight.
func (*MockChainMockRecorder) GetSnapshotHeadersAfterOrEqualTime ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetSnapshotHeadersAfterOrEqualTime(endHashHeight, startTime, producer interface{}) *gomock.Call
GetSnapshotHeadersAfterOrEqualTime indicates an expected call of GetSnapshotHeadersAfterOrEqualTime.
func (*MockChainMockRecorder) GetSnapshotHeightByHash ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetSnapshotHeightByHash(hash interface{}) *gomock.Call
GetSnapshotHeightByHash indicates an expected call of GetSnapshotHeightByHash.
func (*MockChainMockRecorder) GetUnconfirmedBlocks ¶ added in v2.11.3
func (mr *MockChainMockRecorder) GetUnconfirmedBlocks(addr interface{}) *gomock.Call
GetUnconfirmedBlocks indicates an expected call of GetUnconfirmedBlocks.
func (*MockChainMockRecorder) IterateAccounts ¶ added in v2.11.3
func (mr *MockChainMockRecorder) IterateAccounts(iterateFunc interface{}) *gomock.Call
IterateAccounts indicates an expected call of IterateAccounts.
func (*MockChainMockRecorder) QueryLatestSnapshotBlock ¶ added in v2.11.3
func (mr *MockChainMockRecorder) QueryLatestSnapshotBlock() *gomock.Call
QueryLatestSnapshotBlock indicates an expected call of QueryLatestSnapshotBlock.
func (*MockChainMockRecorder) RecoverWrite ¶ added in v2.11.3
func (mr *MockChainMockRecorder) RecoverWrite() *gomock.Call
RecoverWrite indicates an expected call of RecoverWrite.
func (*MockChainMockRecorder) StopWrite ¶ added in v2.11.3
func (mr *MockChainMockRecorder) StopWrite() *gomock.Call
StopWrite indicates an expected call of StopWrite.
type MockConsensus ¶ added in v2.11.3
type MockConsensus struct {
// contains filtered or unexported fields
}
MockConsensus is a mock of Consensus interface.
func NewMockConsensus ¶ added in v2.11.3
func NewMockConsensus(ctrl *gomock.Controller) *MockConsensus
NewMockConsensus creates a new mock instance.
func (*MockConsensus) EXPECT ¶ added in v2.11.3
func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsensus) SBPReader ¶ added in v2.11.3
func (m *MockConsensus) SBPReader() core0.SBPStatReader
SBPReader mocks base method.
func (*MockConsensus) VerifyAccountProducer ¶ added in v2.11.3
func (m *MockConsensus) VerifyAccountProducer(block *core.AccountBlock) (bool, error)
VerifyAccountProducer mocks base method.
type MockConsensusMockRecorder ¶ added in v2.11.3
type MockConsensusMockRecorder struct {
// contains filtered or unexported fields
}
MockConsensusMockRecorder is the mock recorder for MockConsensus.
func (*MockConsensusMockRecorder) SBPReader ¶ added in v2.11.3
func (mr *MockConsensusMockRecorder) SBPReader() *gomock.Call
SBPReader indicates an expected call of SBPReader.
func (*MockConsensusMockRecorder) VerifyAccountProducer ¶ added in v2.11.3
func (mr *MockConsensusMockRecorder) VerifyAccountProducer(block interface{}) *gomock.Call
VerifyAccountProducer indicates an expected call of VerifyAccountProducer.
type MockRedoInterface ¶ added in v2.11.3
type MockRedoInterface struct {
// contains filtered or unexported fields
}
MockRedoInterface is a mock of RedoInterface interface.
func NewMockRedoInterface ¶ added in v2.11.3
func NewMockRedoInterface(ctrl *gomock.Controller) *MockRedoInterface
NewMockRedoInterface creates a new mock instance.
func (*MockRedoInterface) AddLog ¶ added in v2.11.3
func (m *MockRedoInterface) AddLog(addr types.Address, log LogItem)
AddLog mocks base method.
func (*MockRedoInterface) Close ¶ added in v2.11.3
func (m *MockRedoInterface) Close() error
Close mocks base method.
func (*MockRedoInterface) EXPECT ¶ added in v2.11.3
func (m *MockRedoInterface) EXPECT() *MockRedoInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRedoInterface) HasRedo ¶ added in v2.11.3
func (m *MockRedoInterface) HasRedo(snapshotHeight uint64) (bool, error)
HasRedo mocks base method.
func (*MockRedoInterface) InsertSnapshotBlock ¶ added in v2.11.3
func (m *MockRedoInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, confirmedBlocks []*core.AccountBlock)
InsertSnapshotBlock mocks base method.
func (*MockRedoInterface) QueryLog ¶ added in v2.11.3
func (m *MockRedoInterface) QueryLog(snapshotHeight uint64) (SnapshotLog, bool, error)
QueryLog mocks base method.
func (*MockRedoInterface) Rollback ¶ added in v2.11.3
func (m *MockRedoInterface) Rollback(chunks []*core.SnapshotChunk)
Rollback mocks base method.
func (*MockRedoInterface) SetCurrentSnapshot ¶ added in v2.11.3
func (m *MockRedoInterface) SetCurrentSnapshot(snapshotHeight uint64, logMap SnapshotLog)
SetCurrentSnapshot mocks base method.
type MockRedoInterfaceMockRecorder ¶ added in v2.11.3
type MockRedoInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockRedoInterfaceMockRecorder is the mock recorder for MockRedoInterface.
func (*MockRedoInterfaceMockRecorder) AddLog ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) AddLog(addr, log interface{}) *gomock.Call
AddLog indicates an expected call of AddLog.
func (*MockRedoInterfaceMockRecorder) Close ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockRedoInterfaceMockRecorder) HasRedo ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) HasRedo(snapshotHeight interface{}) *gomock.Call
HasRedo indicates an expected call of HasRedo.
func (*MockRedoInterfaceMockRecorder) InsertSnapshotBlock ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, confirmedBlocks interface{}) *gomock.Call
InsertSnapshotBlock indicates an expected call of InsertSnapshotBlock.
func (*MockRedoInterfaceMockRecorder) QueryLog ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) QueryLog(snapshotHeight interface{}) *gomock.Call
QueryLog indicates an expected call of QueryLog.
func (*MockRedoInterfaceMockRecorder) Rollback ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) Rollback(chunks interface{}) *gomock.Call
Rollback indicates an expected call of Rollback.
func (*MockRedoInterfaceMockRecorder) SetCurrentSnapshot ¶ added in v2.11.3
func (mr *MockRedoInterfaceMockRecorder) SetCurrentSnapshot(snapshotHeight, logMap interface{}) *gomock.Call
SetCurrentSnapshot indicates an expected call of SetCurrentSnapshot.
type MockRoundCacheInterface ¶ added in v2.11.3
type MockRoundCacheInterface struct {
// contains filtered or unexported fields
}
MockRoundCacheInterface is a mock of RoundCacheInterface interface.
func NewMockRoundCacheInterface ¶ added in v2.11.3
func NewMockRoundCacheInterface(ctrl *gomock.Controller) *MockRoundCacheInterface
NewMockRoundCacheInterface creates a new mock instance.
func (*MockRoundCacheInterface) DeleteSnapshotBlocks ¶ added in v2.11.3
func (m *MockRoundCacheInterface) DeleteSnapshotBlocks(snapshotBlocks []*core.SnapshotBlock) error
DeleteSnapshotBlocks mocks base method.
func (*MockRoundCacheInterface) EXPECT ¶ added in v2.11.3
func (m *MockRoundCacheInterface) EXPECT() *MockRoundCacheInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRoundCacheInterface) GetSnapshotViteBalanceList ¶ added in v2.11.3
func (m *MockRoundCacheInterface) GetSnapshotViteBalanceList(snapshotHash types.Hash, addrList []types.Address) (map[types.Address]*big.Int, []types.Address, error)
GetSnapshotViteBalanceList mocks base method.
func (*MockRoundCacheInterface) Init ¶ added in v2.11.3
func (m *MockRoundCacheInterface) Init(timeIndex core0.TimeIndex) error
Init mocks base method.
func (*MockRoundCacheInterface) InsertSnapshotBlock ¶ added in v2.11.3
func (m *MockRoundCacheInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, snapshotLog SnapshotLog) error
InsertSnapshotBlock mocks base method.
func (*MockRoundCacheInterface) StorageIterator ¶ added in v2.11.3
func (m *MockRoundCacheInterface) StorageIterator(snapshotHash types.Hash) interfaces.StorageIterator
StorageIterator mocks base method.
type MockRoundCacheInterfaceMockRecorder ¶ added in v2.11.3
type MockRoundCacheInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockRoundCacheInterfaceMockRecorder is the mock recorder for MockRoundCacheInterface.
func (*MockRoundCacheInterfaceMockRecorder) DeleteSnapshotBlocks ¶ added in v2.11.3
func (mr *MockRoundCacheInterfaceMockRecorder) DeleteSnapshotBlocks(snapshotBlocks interface{}) *gomock.Call
DeleteSnapshotBlocks indicates an expected call of DeleteSnapshotBlocks.
func (*MockRoundCacheInterfaceMockRecorder) GetSnapshotViteBalanceList ¶ added in v2.11.3
func (mr *MockRoundCacheInterfaceMockRecorder) GetSnapshotViteBalanceList(snapshotHash, addrList interface{}) *gomock.Call
GetSnapshotViteBalanceList indicates an expected call of GetSnapshotViteBalanceList.
func (*MockRoundCacheInterfaceMockRecorder) Init ¶ added in v2.11.3
func (mr *MockRoundCacheInterfaceMockRecorder) Init(timeIndex interface{}) *gomock.Call
Init indicates an expected call of Init.
func (*MockRoundCacheInterfaceMockRecorder) InsertSnapshotBlock ¶ added in v2.11.3
func (mr *MockRoundCacheInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, snapshotLog interface{}) *gomock.Call
InsertSnapshotBlock indicates an expected call of InsertSnapshotBlock.
func (*MockRoundCacheInterfaceMockRecorder) StorageIterator ¶ added in v2.11.3
func (mr *MockRoundCacheInterfaceMockRecorder) StorageIterator(snapshotHash interface{}) *gomock.Call
StorageIterator indicates an expected call of StorageIterator.
type MockStateDBInterface ¶ added in v2.11.3
type MockStateDBInterface struct {
// contains filtered or unexported fields
}
MockStateDBInterface is a mock of StateDBInterface interface.
func NewMockStateDBInterface ¶ added in v2.11.3
func NewMockStateDBInterface(ctrl *gomock.Controller) *MockStateDBInterface
NewMockStateDBInterface creates a new mock instance.
func (*MockStateDBInterface) Close ¶ added in v2.11.3
func (m *MockStateDBInterface) Close() error
Close mocks base method.
func (*MockStateDBInterface) EXPECT ¶ added in v2.11.3
func (m *MockStateDBInterface) EXPECT() *MockStateDBInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStateDBInterface) GetBalance ¶ added in v2.11.3
func (m *MockStateDBInterface) GetBalance(addr types.Address, tokenTypeId types.TokenTypeId) (*big.Int, error)
GetBalance mocks base method.
func (*MockStateDBInterface) GetBalanceMap ¶ added in v2.11.3
func (m *MockStateDBInterface) GetBalanceMap(addr types.Address) (map[types.TokenTypeId]*big.Int, error)
GetBalanceMap mocks base method.
func (*MockStateDBInterface) GetCallDepth ¶ added in v2.11.3
func (m *MockStateDBInterface) GetCallDepth(sendBlockHash *types.Hash) (uint16, error)
GetCallDepth mocks base method.
func (*MockStateDBInterface) GetCode ¶ added in v2.11.3
func (m *MockStateDBInterface) GetCode(addr types.Address) ([]byte, error)
GetCode mocks base method.
func (*MockStateDBInterface) GetContractList ¶ added in v2.11.3
GetContractList mocks base method.
func (*MockStateDBInterface) GetContractMeta ¶ added in v2.11.3
func (m *MockStateDBInterface) GetContractMeta(addr types.Address) (*core.ContractMeta, error)
GetContractMeta mocks base method.
func (*MockStateDBInterface) GetSnapshotBalanceList ¶ added in v2.11.3
func (m *MockStateDBInterface) GetSnapshotBalanceList(balanceMap map[types.Address]*big.Int, snapshotBlockHash types.Hash, addrList []types.Address, tokenId types.TokenTypeId) error
GetSnapshotBalanceList mocks base method.
func (*MockStateDBInterface) GetSnapshotValue ¶ added in v2.11.3
func (m *MockStateDBInterface) GetSnapshotValue(snapshotBlockHeight uint64, addr types.Address, key []byte) ([]byte, error)
GetSnapshotValue mocks base method.
func (*MockStateDBInterface) GetStatus ¶ added in v2.11.3
func (m *MockStateDBInterface) GetStatus() []interfaces.DBStatus
GetStatus mocks base method.
func (*MockStateDBInterface) GetStorageValue ¶ added in v2.11.3
GetStorageValue mocks base method.
func (*MockStateDBInterface) GetVmLogList ¶ added in v2.11.3
GetVmLogList mocks base method.
func (*MockStateDBInterface) HasContractMeta ¶ added in v2.11.3
func (m *MockStateDBInterface) HasContractMeta(addr types.Address) (bool, error)
HasContractMeta mocks base method.
func (*MockStateDBInterface) Init ¶ added in v2.11.3
func (m *MockStateDBInterface) Init() error
Init mocks base method.
func (*MockStateDBInterface) InsertSnapshotBlock ¶ added in v2.11.3
func (m *MockStateDBInterface) InsertSnapshotBlock(snapshotBlock *core.SnapshotBlock, confirmedBlocks []*core.AccountBlock) error
InsertSnapshotBlock mocks base method.
func (*MockStateDBInterface) IterateContracts ¶ added in v2.11.3
func (m *MockStateDBInterface) IterateContracts(iterateFunc func(types.Address, *core.ContractMeta, error) bool)
IterateContracts mocks base method.
func (*MockStateDBInterface) NewRawSnapshotStorageIteratorByHeight ¶ added in v2.11.3
func (m *MockStateDBInterface) NewRawSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) interfaces.StorageIterator
NewRawSnapshotStorageIteratorByHeight mocks base method.
func (*MockStateDBInterface) NewSnapshotStorageIterator ¶ added in v2.11.3
func (m *MockStateDBInterface) NewSnapshotStorageIterator(snapshotHash types.Hash, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
NewSnapshotStorageIterator mocks base method.
func (*MockStateDBInterface) NewSnapshotStorageIteratorByHeight ¶ added in v2.11.3
func (m *MockStateDBInterface) NewSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
NewSnapshotStorageIteratorByHeight mocks base method.
func (*MockStateDBInterface) NewStorageDatabase ¶ added in v2.11.3
func (m *MockStateDBInterface) NewStorageDatabase(snapshotHash types.Hash, addr types.Address) (StorageDatabaseInterface, error)
NewStorageDatabase mocks base method.
func (*MockStateDBInterface) NewStorageIterator ¶ added in v2.11.3
func (m *MockStateDBInterface) NewStorageIterator(addr types.Address, prefix []byte) interfaces.StorageIterator
NewStorageIterator mocks base method.
func (*MockStateDBInterface) Redo ¶ added in v2.11.3
func (m *MockStateDBInterface) Redo() RedoInterface
Redo mocks base method.
func (*MockStateDBInterface) RedoStore ¶ added in v2.11.3
func (m *MockStateDBInterface) RedoStore() *db.Store
RedoStore mocks base method.
func (*MockStateDBInterface) RollbackAccountBlocks ¶ added in v2.11.3
func (m *MockStateDBInterface) RollbackAccountBlocks(accountBlocks []*core.AccountBlock) error
RollbackAccountBlocks mocks base method.
func (*MockStateDBInterface) RollbackSnapshotBlocks ¶ added in v2.11.3
func (m *MockStateDBInterface) RollbackSnapshotBlocks(deletedSnapshotSegments []*core.SnapshotChunk, newUnconfirmedBlocks []*core.AccountBlock) error
RollbackSnapshotBlocks mocks base method.
func (*MockStateDBInterface) SetCacheLevelForConsensus ¶ added in v2.11.3
func (m *MockStateDBInterface) SetCacheLevelForConsensus(level uint32)
SetCacheLevelForConsensus mocks base method.
func (*MockStateDBInterface) SetTimeIndex ¶ added in v2.11.3
func (m *MockStateDBInterface) SetTimeIndex(periodTimeIndex interfaces.TimeIndex) error
SetTimeIndex mocks base method.
func (*MockStateDBInterface) Store ¶ added in v2.11.3
func (m *MockStateDBInterface) Store() *db.Store
Store mocks base method.
func (*MockStateDBInterface) Write ¶ added in v2.11.3
func (m *MockStateDBInterface) Write(block *interfaces.VmAccountBlock) error
Write mocks base method.
func (*MockStateDBInterface) WriteByRedo ¶ added in v2.11.3
func (m *MockStateDBInterface) WriteByRedo(blockHash types.Hash, addr types.Address, redoLog LogItem)
WriteByRedo mocks base method.
type MockStateDBInterfaceMockRecorder ¶ added in v2.11.3
type MockStateDBInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockStateDBInterfaceMockRecorder is the mock recorder for MockStateDBInterface.
func (*MockStateDBInterfaceMockRecorder) Close ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockStateDBInterfaceMockRecorder) GetBalance ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetBalance(addr, tokenTypeId interface{}) *gomock.Call
GetBalance indicates an expected call of GetBalance.
func (*MockStateDBInterfaceMockRecorder) GetBalanceMap ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetBalanceMap(addr interface{}) *gomock.Call
GetBalanceMap indicates an expected call of GetBalanceMap.
func (*MockStateDBInterfaceMockRecorder) GetCallDepth ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetCallDepth(sendBlockHash interface{}) *gomock.Call
GetCallDepth indicates an expected call of GetCallDepth.
func (*MockStateDBInterfaceMockRecorder) GetCode ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetCode(addr interface{}) *gomock.Call
GetCode indicates an expected call of GetCode.
func (*MockStateDBInterfaceMockRecorder) GetContractList ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetContractList(gid interface{}) *gomock.Call
GetContractList indicates an expected call of GetContractList.
func (*MockStateDBInterfaceMockRecorder) GetContractMeta ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetContractMeta(addr interface{}) *gomock.Call
GetContractMeta indicates an expected call of GetContractMeta.
func (*MockStateDBInterfaceMockRecorder) GetSnapshotBalanceList ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetSnapshotBalanceList(balanceMap, snapshotBlockHash, addrList, tokenId interface{}) *gomock.Call
GetSnapshotBalanceList indicates an expected call of GetSnapshotBalanceList.
func (*MockStateDBInterfaceMockRecorder) GetSnapshotValue ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetSnapshotValue(snapshotBlockHeight, addr, key interface{}) *gomock.Call
GetSnapshotValue indicates an expected call of GetSnapshotValue.
func (*MockStateDBInterfaceMockRecorder) GetStatus ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetStatus() *gomock.Call
GetStatus indicates an expected call of GetStatus.
func (*MockStateDBInterfaceMockRecorder) GetStorageValue ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetStorageValue(addr, key interface{}) *gomock.Call
GetStorageValue indicates an expected call of GetStorageValue.
func (*MockStateDBInterfaceMockRecorder) GetVmLogList ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) GetVmLogList(logHash interface{}) *gomock.Call
GetVmLogList indicates an expected call of GetVmLogList.
func (*MockStateDBInterfaceMockRecorder) HasContractMeta ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) HasContractMeta(addr interface{}) *gomock.Call
HasContractMeta indicates an expected call of HasContractMeta.
func (*MockStateDBInterfaceMockRecorder) Init ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) Init() *gomock.Call
Init indicates an expected call of Init.
func (*MockStateDBInterfaceMockRecorder) InsertSnapshotBlock ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) InsertSnapshotBlock(snapshotBlock, confirmedBlocks interface{}) *gomock.Call
InsertSnapshotBlock indicates an expected call of InsertSnapshotBlock.
func (*MockStateDBInterfaceMockRecorder) IterateContracts ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) IterateContracts(iterateFunc interface{}) *gomock.Call
IterateContracts indicates an expected call of IterateContracts.
func (*MockStateDBInterfaceMockRecorder) NewRawSnapshotStorageIteratorByHeight ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) NewRawSnapshotStorageIteratorByHeight(snapshotHeight, addr, prefix interface{}) *gomock.Call
NewRawSnapshotStorageIteratorByHeight indicates an expected call of NewRawSnapshotStorageIteratorByHeight.
func (*MockStateDBInterfaceMockRecorder) NewSnapshotStorageIterator ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) NewSnapshotStorageIterator(snapshotHash, addr, prefix interface{}) *gomock.Call
NewSnapshotStorageIterator indicates an expected call of NewSnapshotStorageIterator.
func (*MockStateDBInterfaceMockRecorder) NewSnapshotStorageIteratorByHeight ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) NewSnapshotStorageIteratorByHeight(snapshotHeight, addr, prefix interface{}) *gomock.Call
NewSnapshotStorageIteratorByHeight indicates an expected call of NewSnapshotStorageIteratorByHeight.
func (*MockStateDBInterfaceMockRecorder) NewStorageDatabase ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) NewStorageDatabase(snapshotHash, addr interface{}) *gomock.Call
NewStorageDatabase indicates an expected call of NewStorageDatabase.
func (*MockStateDBInterfaceMockRecorder) NewStorageIterator ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) NewStorageIterator(addr, prefix interface{}) *gomock.Call
NewStorageIterator indicates an expected call of NewStorageIterator.
func (*MockStateDBInterfaceMockRecorder) Redo ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) Redo() *gomock.Call
Redo indicates an expected call of Redo.
func (*MockStateDBInterfaceMockRecorder) RedoStore ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) RedoStore() *gomock.Call
RedoStore indicates an expected call of RedoStore.
func (*MockStateDBInterfaceMockRecorder) RollbackAccountBlocks ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) RollbackAccountBlocks(accountBlocks interface{}) *gomock.Call
RollbackAccountBlocks indicates an expected call of RollbackAccountBlocks.
func (*MockStateDBInterfaceMockRecorder) RollbackSnapshotBlocks ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) RollbackSnapshotBlocks(deletedSnapshotSegments, newUnconfirmedBlocks interface{}) *gomock.Call
RollbackSnapshotBlocks indicates an expected call of RollbackSnapshotBlocks.
func (*MockStateDBInterfaceMockRecorder) SetCacheLevelForConsensus ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) SetCacheLevelForConsensus(level interface{}) *gomock.Call
SetCacheLevelForConsensus indicates an expected call of SetCacheLevelForConsensus.
func (*MockStateDBInterfaceMockRecorder) SetTimeIndex ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) SetTimeIndex(periodTimeIndex interface{}) *gomock.Call
SetTimeIndex indicates an expected call of SetTimeIndex.
func (*MockStateDBInterfaceMockRecorder) Store ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) Store() *gomock.Call
Store indicates an expected call of Store.
func (*MockStateDBInterfaceMockRecorder) Write ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) Write(block interface{}) *gomock.Call
Write indicates an expected call of Write.
func (*MockStateDBInterfaceMockRecorder) WriteByRedo ¶ added in v2.11.3
func (mr *MockStateDBInterfaceMockRecorder) WriteByRedo(blockHash, addr, redoLog interface{}) *gomock.Call
WriteByRedo indicates an expected call of WriteByRedo.
type MockStorageDatabaseInterface ¶ added in v2.11.3
type MockStorageDatabaseInterface struct {
// contains filtered or unexported fields
}
MockStorageDatabaseInterface is a mock of StorageDatabaseInterface interface.
func NewMockStorageDatabaseInterface ¶ added in v2.11.3
func NewMockStorageDatabaseInterface(ctrl *gomock.Controller) *MockStorageDatabaseInterface
NewMockStorageDatabaseInterface creates a new mock instance.
func (*MockStorageDatabaseInterface) Address ¶ added in v2.11.3
func (m *MockStorageDatabaseInterface) Address() *types.Address
Address mocks base method.
func (*MockStorageDatabaseInterface) EXPECT ¶ added in v2.11.3
func (m *MockStorageDatabaseInterface) EXPECT() *MockStorageDatabaseInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStorageDatabaseInterface) GetValue ¶ added in v2.11.3
func (m *MockStorageDatabaseInterface) GetValue(key []byte) ([]byte, error)
GetValue mocks base method.
func (*MockStorageDatabaseInterface) NewStorageIterator ¶ added in v2.11.3
func (m *MockStorageDatabaseInterface) NewStorageIterator(prefix []byte) (interfaces.StorageIterator, error)
NewStorageIterator mocks base method.
type MockStorageDatabaseInterfaceMockRecorder ¶ added in v2.11.3
type MockStorageDatabaseInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockStorageDatabaseInterfaceMockRecorder is the mock recorder for MockStorageDatabaseInterface.
func (*MockStorageDatabaseInterfaceMockRecorder) Address ¶ added in v2.11.3
func (mr *MockStorageDatabaseInterfaceMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address.
func (*MockStorageDatabaseInterfaceMockRecorder) GetValue ¶ added in v2.11.3
func (mr *MockStorageDatabaseInterfaceMockRecorder) GetValue(key interface{}) *gomock.Call
GetValue indicates an expected call of GetValue.
func (*MockStorageDatabaseInterfaceMockRecorder) NewStorageIterator ¶ added in v2.11.3
func (mr *MockStorageDatabaseInterfaceMockRecorder) NewStorageIterator(prefix interface{}) *gomock.Call
NewStorageIterator indicates an expected call of NewStorageIterator.
type MockTimeIndex ¶ added in v2.11.3
type MockTimeIndex struct {
// contains filtered or unexported fields
}
MockTimeIndex is a mock of TimeIndex interface.
func NewMockTimeIndex ¶ added in v2.11.3
func NewMockTimeIndex(ctrl *gomock.Controller) *MockTimeIndex
NewMockTimeIndex creates a new mock instance.
func (*MockTimeIndex) EXPECT ¶ added in v2.11.3
func (m *MockTimeIndex) EXPECT() *MockTimeIndexMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTimeIndex) Index2Time ¶ added in v2.11.3
Index2Time mocks base method.
func (*MockTimeIndex) Time2Index ¶ added in v2.11.3
func (m *MockTimeIndex) Time2Index(t time.Time) uint64
Time2Index mocks base method.
type MockTimeIndexMockRecorder ¶ added in v2.11.3
type MockTimeIndexMockRecorder struct {
// contains filtered or unexported fields
}
MockTimeIndexMockRecorder is the mock recorder for MockTimeIndex.
func (*MockTimeIndexMockRecorder) Index2Time ¶ added in v2.11.3
func (mr *MockTimeIndexMockRecorder) Index2Time(index interface{}) *gomock.Call
Index2Time indicates an expected call of Index2Time.
func (*MockTimeIndexMockRecorder) Time2Index ¶ added in v2.11.3
func (mr *MockTimeIndexMockRecorder) Time2Index(t interface{}) *gomock.Call
Time2Index indicates an expected call of Time2Index.
type Redo ¶
type Redo struct {
// contains filtered or unexported fields
}
func NewStorageRedoWithStore ¶
func (*Redo) InsertSnapshotBlock ¶
func (redo *Redo) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock)
func (*Redo) QueryLog ¶
func (redo *Redo) QueryLog(snapshotHeight uint64) (SnapshotLog, bool, error)
func (*Redo) Rollback ¶
func (redo *Redo) Rollback(chunks []*ledger.SnapshotChunk)
func (*Redo) SetCurrentSnapshot ¶
func (redo *Redo) SetCurrentSnapshot(snapshotHeight uint64, logMap SnapshotLog)
type RedoCache ¶
type RedoCache struct {
// contains filtered or unexported fields
}
func NewRedoCache ¶
func NewRedoCache() *RedoCache
func (*RedoCache) Current ¶
func (redoCache *RedoCache) Current() SnapshotLog
func (*RedoCache) Set ¶
func (redoCache *RedoCache) Set(snapshotHeight uint64, snapshotLog SnapshotLog)
func (*RedoCache) SetCurrent ¶
func (redoCache *RedoCache) SetCurrent(snapshotHeight uint64, snapshotLog SnapshotLog)
type RedoCacheData ¶
type RedoCacheData struct {
// contains filtered or unexported fields
}
func NewRedoCacheData ¶
func NewRedoCacheData(roundIndex uint64, lastSnapshotBlock *ledger.SnapshotBlock, currentData *memdb.DB, redoLogs *RoundCacheRedoLogs) *RedoCacheData
type RedoInterface ¶
type RedoInterface interface { Close() error InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock) HasRedo(snapshotHeight uint64) (bool, error) QueryLog(snapshotHeight uint64) (SnapshotLog, bool, error) SetCurrentSnapshot(snapshotHeight uint64, logMap SnapshotLog) AddLog(addr types.Address, log LogItem) Rollback(chunks []*ledger.SnapshotChunk) // contains filtered or unexported methods }
type RoundCache ¶
type RoundCache struct {
// contains filtered or unexported fields
}
func NewRoundCache ¶
func NewRoundCache(chain Chain, stateDB StateDBInterface, roundCount uint8) *RoundCache
func (*RoundCache) DeleteSnapshotBlocks ¶
func (cache *RoundCache) DeleteSnapshotBlocks(snapshotBlocks []*ledger.SnapshotBlock) error
panic when return error
func (*RoundCache) GetSnapshotViteBalanceList ¶
func (cache *RoundCache) GetSnapshotViteBalanceList(snapshotHash types.Hash, addrList []types.Address) (map[types.Address]*big.Int, []types.Address, error)
tokenId is viteTokenID
func (*RoundCache) Init ¶
func (cache *RoundCache) Init(timeIndex interfaces.TimeIndex) (returnErr error)
build data
func (*RoundCache) InsertSnapshotBlock ¶
func (cache *RoundCache) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, snapshotLog SnapshotLog) (returnErr error)
panic when return error
func (*RoundCache) StorageIterator ¶
func (cache *RoundCache) StorageIterator(snapshotHash types.Hash) interfaces.StorageIterator
type RoundCacheInterface ¶
type RoundCacheInterface interface { Init(timeIndex core.TimeIndex) (returnErr error) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, snapshotLog SnapshotLog) (returnErr error) DeleteSnapshotBlocks(snapshotBlocks []*ledger.SnapshotBlock) error GetSnapshotViteBalanceList(snapshotHash types.Hash, addrList []types.Address) (map[types.Address]*big.Int, []types.Address, error) StorageIterator(snapshotHash types.Hash) interfaces.StorageIterator // contains filtered or unexported methods }
type RoundCacheLogItem ¶
type RoundCacheLogItem struct { Storage [][2][]byte BalanceMap map[types.TokenTypeId]*big.Int }
type RoundCacheRedoLogs ¶
type RoundCacheRedoLogs struct {
Logs []*RoundCacheSnapshotLog
}
func NewRoundCacheRedoLogs ¶
func NewRoundCacheRedoLogs() *RoundCacheRedoLogs
func (*RoundCacheRedoLogs) Add ¶
func (redoLogs *RoundCacheRedoLogs) Add(snapshotHeight uint64, snapshotLog SnapshotLog)
type RoundCacheSnapshotLog ¶
type RoundCacheSnapshotLog struct { LogMap map[types.Address][]RoundCacheLogItem SnapshotHeight uint64 }
type SnapshotLog ¶
func (*SnapshotLog) Deserialize ¶
func (sl *SnapshotLog) Deserialize(buf []byte) error
func (*SnapshotLog) Serialize ¶
func (sl *SnapshotLog) Serialize() ([]byte, error)
type StateDB ¶
type StateDB struct {
// contains filtered or unexported fields
}
func NewStateDB ¶
func NewStateDBWithStore ¶
func (*StateDB) GetBalance ¶
func (*StateDB) GetBalanceMap ¶
func (*StateDB) GetCallDepth ¶
func (*StateDB) GetContractList ¶
func (*StateDB) GetContractMeta ¶
func (*StateDB) GetSnapshotBalanceList ¶
func (*StateDB) GetSnapshotValue ¶
func (*StateDB) GetStatus ¶
func (sDB *StateDB) GetStatus() []interfaces.DBStatus
func (*StateDB) GetStorageValue ¶
func (*StateDB) GetVmLogList ¶
func (*StateDB) HasContractMeta ¶
func (*StateDB) InsertSnapshotBlock ¶
func (sDB *StateDB) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock) error
func (*StateDB) IterateContracts ¶
func (*StateDB) NewRawSnapshotStorageIteratorByHeight ¶
func (sDB *StateDB) NewRawSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) interfaces.StorageIterator
func (*StateDB) NewSnapshotStorageIterator ¶
func (sDB *StateDB) NewSnapshotStorageIterator(snapshotHash types.Hash, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
func (*StateDB) NewSnapshotStorageIteratorByHeight ¶
func (sDB *StateDB) NewSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) (interfaces.StorageIterator, error)
func (*StateDB) NewStorageDatabase ¶
func (*StateDB) NewStorageIterator ¶
func (sDB *StateDB) NewStorageIterator(addr types.Address, prefix []byte) interfaces.StorageIterator
func (*StateDB) Redo ¶
func (sDB *StateDB) Redo() RedoInterface
func (*StateDB) RollbackAccountBlocks ¶
func (sDB *StateDB) RollbackAccountBlocks(accountBlocks []*ledger.AccountBlock) error
func (*StateDB) RollbackSnapshotBlocks ¶
func (sDB *StateDB) RollbackSnapshotBlocks(deletedSnapshotSegments []*ledger.SnapshotChunk, newUnconfirmedBlocks []*ledger.AccountBlock) error
func (*StateDB) SetCacheLevelForConsensus ¶
func (*StateDB) SetTimeIndex ¶ added in v2.11.3
func (sDB *StateDB) SetTimeIndex(periodTimeIndex interfaces.TimeIndex) error
func (*StateDB) Write ¶
func (sDB *StateDB) Write(block *interfaces.VmAccountBlock) error
type StateDBInterface ¶
type StateDBInterface interface { NewStorageIterator(addr types.Address, prefix []byte) interfaces.StorageIterator NewSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) (interfaces.StorageIterator, error) NewSnapshotStorageIterator(snapshotHash types.Hash, addr types.Address, prefix []byte) (interfaces.StorageIterator, error) NewRawSnapshotStorageIteratorByHeight(snapshotHeight uint64, addr types.Address, prefix []byte) interfaces.StorageIterator RollbackSnapshotBlocks(deletedSnapshotSegments []*ledger.SnapshotChunk, newUnconfirmedBlocks []*ledger.AccountBlock) error RollbackAccountBlocks(accountBlocks []*ledger.AccountBlock) error Init() error Close() error SetTimeIndex(periodTimeIndex interfaces.TimeIndex) error GetStorageValue(addr *types.Address, key []byte) ([]byte, error) GetBalance(addr types.Address, tokenTypeId types.TokenTypeId) (*big.Int, error) GetBalanceMap(addr types.Address) (map[types.TokenTypeId]*big.Int, error) GetCode(addr types.Address) ([]byte, error) GetContractMeta(addr types.Address) (*ledger.ContractMeta, error) IterateContracts(iterateFunc func(addr types.Address, meta *ledger.ContractMeta, err error) bool) HasContractMeta(addr types.Address) (bool, error) GetContractList(gid *types.Gid) ([]types.Address, error) GetVmLogList(logHash *types.Hash) (ledger.VmLogList, error) GetCallDepth(sendBlockHash *types.Hash) (uint16, error) GetSnapshotBalanceList(balanceMap map[types.Address]*big.Int, snapshotBlockHash types.Hash, addrList []types.Address, tokenId types.TokenTypeId) error GetSnapshotValue(snapshotBlockHeight uint64, addr types.Address, key []byte) ([]byte, error) SetCacheLevelForConsensus(level uint32) Store() *chain_db.Store RedoStore() *chain_db.Store Redo() RedoInterface GetStatus() []interfaces.DBStatus NewStorageDatabase(snapshotHash types.Hash, addr types.Address) (StorageDatabaseInterface, error) Write(block *interfaces.VmAccountBlock) error WriteByRedo(blockHash types.Hash, addr types.Address, redoLog LogItem) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock) error // contains filtered or unexported methods }
type StorageDatabase ¶
type StorageDatabase struct {
// contains filtered or unexported fields
}
func (*StorageDatabase) Address ¶
func (sd *StorageDatabase) Address() *types.Address
func (*StorageDatabase) NewStorageIterator ¶
func (sd *StorageDatabase) NewStorageIterator(prefix []byte) (interfaces.StorageIterator, error)
type StorageDatabaseInterface ¶
type StorageDatabaseInterface interface { GetValue(key []byte) ([]byte, error) NewStorageIterator(prefix []byte) (interfaces.StorageIterator, error) Address() *types.Address }
func NewStorageDatabase ¶
func NewStorageDatabase(stateDb *StateDB, hashHeight ledger.HashHeight, addr types.Address) StorageDatabaseInterface
type TransformIterator ¶
type TransformIterator struct {
// contains filtered or unexported fields
}
func NewTransformIterator ¶
func NewTransformIterator(iter iterator.Iterator, keyPrefixLength int) *TransformIterator
func (*TransformIterator) Error ¶
func (rcIter *TransformIterator) Error() error
func (*TransformIterator) Key ¶
func (rcIter *TransformIterator) Key() []byte
func (*TransformIterator) Last ¶
func (rcIter *TransformIterator) Last() bool
func (*TransformIterator) Next ¶
func (rcIter *TransformIterator) Next() bool
func (*TransformIterator) Prev ¶
func (rcIter *TransformIterator) Prev() bool
func (*TransformIterator) Release ¶
func (rcIter *TransformIterator) Release()
func (*TransformIterator) Seek ¶
func (rcIter *TransformIterator) Seek(key []byte) bool
func (*TransformIterator) Value ¶
func (rcIter *TransformIterator) Value() []byte