Documentation ¶
Index ¶
- type AccountsStub
- func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetAllLeaves(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
- func (as *AccountsStub) GetCode(codeHash []byte) []byte
- func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, error)
- func (as *AccountsStub) GetNumCheckpoints() uint32
- func (as *AccountsStub) GetTrie(codeHash []byte) (data.Trie, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) RecreateAllTries(rootHash []byte, _ context.Context) (map[string]data.Trie, error)
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
- func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
- type ApiResolverStub
- func (ars *ApiResolverStub) Close() error
- func (ars *ApiResolverStub) ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
- func (ars *ApiResolverStub) ExecuteSCQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)
- func (ars *ApiResolverStub) GetDelegatorsList() ([]*api.Delegator, error)
- func (ars *ApiResolverStub) GetDirectStakedList() ([]*api.DirectStakedValue, error)
- func (ars *ApiResolverStub) GetTotalStakedValue() (*api.StakeValues, error)
- func (ars *ApiResolverStub) IsInterfaceNil() bool
- func (ars *ApiResolverStub) StatusMetrics() external.StatusMetricsHandler
- type ChainHandlerStub
- func (chs *ChainHandlerStub) CreateNewHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte
- func (chs *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetGenesisHeaderHash() []byte
- func (chs *ChainHandlerStub) IsInterfaceNil() bool
- func (chs *ChainHandlerStub) SetCurrentBlockHeader(bh data.HeaderHandler) error
- func (chs *ChainHandlerStub) SetCurrentBlockHeaderHash(_ []byte)
- func (chs *ChainHandlerStub) SetGenesisHeader(gb data.HeaderHandler) error
- func (chs *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)
- type NodeStub
- func (ns *NodeStub) CreateTransaction(nonce uint64, value string, receiver string, receiverUsername []byte, ...) (*transaction.Transaction, []byte, error)
- func (ns *NodeStub) DecodeAddressPubkey(pk string) ([]byte, error)
- func (ns *NodeStub) DirectTrigger(epoch uint32, withEarlyEndOfEpoch bool) error
- func (ns *NodeStub) EncodeAddressPubkey(pk []byte) (string, error)
- func (ns *NodeStub) GetAccount(address string) (state.UserAccountHandler, error)
- func (ns *NodeStub) GetAllESDTTokens(address string) (map[string]*esdt.ESDigitalToken, error)
- func (ns *NodeStub) GetAllIssuedESDTs(tokenType string) ([]string, error)
- func (ns *NodeStub) GetBalance(address string) (*big.Int, error)
- func (ns *NodeStub) GetBlockByHash(hash string, withTxs bool) (*api.Block, error)
- func (ns *NodeStub) GetBlockByNonce(nonce uint64, withTxs bool) (*api.Block, error)
- func (ns *NodeStub) GetCode(account state.UserAccountHandler) []byte
- func (ns *NodeStub) GetESDTData(address, tokenID string, nonce uint64) (*esdt.ESDigitalToken, error)
- func (ns *NodeStub) GetESDTsWithRole(address string, role string) ([]string, error)
- func (ns *NodeStub) GetHeartbeats() []data.PubKeyHeartbeat
- func (ns *NodeStub) GetKeyValuePairs(address string) (map[string]string, error)
- func (ns *NodeStub) GetNFTTokenIDsRegisteredByAddress(address string) ([]string, error)
- func (ns *NodeStub) GetPeerInfo(pid string) ([]core.QueryP2PPeerInfo, error)
- func (ns *NodeStub) GetQueryHandler(name string) (debug.QueryHandler, error)
- func (ns *NodeStub) GetTransaction(hash string, withEvents bool) (*transaction.ApiTransactionResult, error)
- func (ns *NodeStub) GetUsername(address string) (string, error)
- func (ns *NodeStub) GetValueForKey(address string, key string) (string, error)
- func (ns *NodeStub) IsInterfaceNil() bool
- func (ns *NodeStub) IsSelfTrigger() bool
- func (ns *NodeStub) SendBulkTransactions(txs []*transaction.Transaction) (uint64, error)
- func (ns *NodeStub) ValidateTransaction(tx *transaction.Transaction) error
- func (ns *NodeStub) ValidateTransactionForSimulation(tx *transaction.Transaction, bypassSignature bool) error
- func (ns *NodeStub) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse, error)
- type SyncTimerMock
- type TrieStub
- func (ts *TrieStub) AppendToOldHashes(hashes [][]byte)
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, error)
- func (ts *TrieStub) GetAllHashes() ([][]byte, error)
- func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
- func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
- func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
- func (ts *TrieStub) GetProof(key []byte) ([][]byte, error)
- func (ts *TrieStub) GetSerializedNode(hash []byte) ([]byte, error)
- func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error)
- func (ts *TrieStub) GetStorageManager() data.StorageManager
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)
- func (ts *TrieStub) ResetOldHashes() [][]byte
- func (ts *TrieStub) RootHash() ([]byte, error)
- func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
- func (ts *TrieStub) String() string
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) VerifyProof(key []byte, proof [][]byte) (bool, error)
- type TxExecutionSimulatorStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsStub ¶ added in v1.0.149
type AccountsStub struct { AddJournalEntryCalled func(je state.JournalEntry) GetExistingAccountCalled func(addressContainer []byte) (state.AccountHandler, error) LoadAccountCalled func(container []byte) (state.AccountHandler, error) SaveAccountCalled func(account state.AccountHandler) error RemoveAccountCalled func(addressContainer []byte) error CommitCalled func() ([]byte, error) JournalLenCalled func() int RevertToSnapshotCalled func(snapshot int) error RootHashCalled func() ([]byte, error) RecreateTrieCalled func(rootHash []byte) error PruneTrieCalled func(rootHash []byte, identifier data.TriePruningIdentifier) CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) SnapshotStateCalled func(rootHash []byte) SetStateCheckpointCalled func(rootHash []byte) IsPruningEnabledCalled func() bool GetAllLeavesCalled func(rootHash []byte) (chan core.KeyValueHolder, error) RecreateAllTriesCalled func(rootHash []byte) (map[string]data.Trie, error) GetNumCheckpointsCalled func() uint32 GetCodeCalled func([]byte) []byte GetTrieCalled func([]byte) (data.Trie, error) }
AccountsStub -
func (*AccountsStub) AddJournalEntry ¶ added in v1.0.149
func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)
AddJournalEntry -
func (*AccountsStub) CancelPrune ¶ added in v1.0.149
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) Commit ¶ added in v1.0.149
func (as *AccountsStub) Commit() ([]byte, error)
Commit -
func (*AccountsStub) GetAllLeaves ¶ added in v1.0.149
func (as *AccountsStub) GetAllLeaves(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
GetAllLeaves -
func (*AccountsStub) GetCode ¶ added in v1.1.22
func (as *AccountsStub) GetCode(codeHash []byte) []byte
GetCode -
func (*AccountsStub) GetExistingAccount ¶ added in v1.0.149
func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) GetNumCheckpoints ¶ added in v1.0.149
func (as *AccountsStub) GetNumCheckpoints() uint32
GetNumCheckpoints -
func (*AccountsStub) GetTrie ¶ added in v1.2.0
func (as *AccountsStub) GetTrie(codeHash []byte) (data.Trie, error)
GetTrie -
func (*AccountsStub) IsInterfaceNil ¶ added in v1.0.149
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶ added in v1.0.149
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) JournalLen ¶ added in v1.0.149
func (as *AccountsStub) JournalLen() int
JournalLen -
func (*AccountsStub) LoadAccount ¶ added in v1.0.149
func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)
LoadAccount -
func (*AccountsStub) PruneTrie ¶ added in v1.0.149
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
PruneTrie -
func (*AccountsStub) RecreateAllTries ¶ added in v1.0.149
func (as *AccountsStub) RecreateAllTries(rootHash []byte, _ context.Context) (map[string]data.Trie, error)
RecreateAllTries -
func (*AccountsStub) RecreateTrie ¶ added in v1.0.149
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RemoveAccount ¶ added in v1.0.149
func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶ added in v1.0.149
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) RootHash ¶ added in v1.0.149
func (as *AccountsStub) RootHash() ([]byte, error)
RootHash -
func (*AccountsStub) SaveAccount ¶ added in v1.0.149
func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶ added in v1.0.149
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶ added in v1.0.149
func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
SnapshotState -
type ApiResolverStub ¶
type ApiResolverStub struct { ExecuteSCQueryHandler func(query *process.SCQuery) (*vmcommon.VMOutput, error) StatusMetricsHandler func() external.StatusMetricsHandler ComputeTransactionGasLimitHandler func(tx *transaction.Transaction) (*transaction.CostResponse, error) GetTotalStakedValueHandler func() (*api.StakeValues, error) GetDirectStakedListHandler func() ([]*api.DirectStakedValue, error) GetDelegatorsListHandler func() ([]*api.Delegator, error) }
ApiResolverStub -
func (*ApiResolverStub) ComputeTransactionGasLimit ¶
func (ars *ApiResolverStub) ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
ComputeTransactionGasLimit -
func (*ApiResolverStub) ExecuteSCQuery ¶
ExecuteSCQuery -
func (*ApiResolverStub) GetDelegatorsList ¶ added in v1.1.45
func (ars *ApiResolverStub) GetDelegatorsList() ([]*api.Delegator, error)
GetDelegatorsList -
func (*ApiResolverStub) GetDirectStakedList ¶ added in v1.1.45
func (ars *ApiResolverStub) GetDirectStakedList() ([]*api.DirectStakedValue, error)
GetDirectStakedList -
func (*ApiResolverStub) GetTotalStakedValue ¶ added in v1.1.18
func (ars *ApiResolverStub) GetTotalStakedValue() (*api.StakeValues, error)
GetTotalStakedValue -
func (*ApiResolverStub) IsInterfaceNil ¶
func (ars *ApiResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ApiResolverStub) StatusMetrics ¶
func (ars *ApiResolverStub) StatusMetrics() external.StatusMetricsHandler
StatusMetrics -
type ChainHandlerStub ¶ added in v1.2.0
type ChainHandlerStub struct { GetGenesisHeaderCalled func() data.HeaderHandler GetGenesisHeaderHashCalled func() []byte SetGenesisHeaderCalled func(gb data.HeaderHandler) error SetGenesisHeaderHashCalled func(hash []byte) SetCurrentBlockHeaderCalled func(bh data.HeaderHandler) error GetCurrentBlockHeaderCalled func() data.HeaderHandler CreateNewHeaderCalled func() data.HeaderHandler }
ChainHandlerStub -
func (*ChainHandlerStub) CreateNewHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*ChainHandlerStub) GetCurrentBlockHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader -
func (*ChainHandlerStub) GetCurrentBlockHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash -
func (*ChainHandlerStub) GetGenesisHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader -
func (*ChainHandlerStub) GetGenesisHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash -
func (*ChainHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (chs *ChainHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainHandlerStub) SetCurrentBlockHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetCurrentBlockHeader(bh data.HeaderHandler) error
SetCurrentBlockHeader -
func (*ChainHandlerStub) SetCurrentBlockHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetCurrentBlockHeaderHash(_ []byte)
SetCurrentBlockHeaderHash -
func (*ChainHandlerStub) SetGenesisHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetGenesisHeader(gb data.HeaderHandler) error
SetGenesisHeader -
func (*ChainHandlerStub) SetGenesisHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash -
type NodeStub ¶ added in v1.0.102
type NodeStub struct { AddressHandler func() (string, error) ConnectToAddressesHandler func([]string) error GetBalanceHandler func(address string) (*big.Int, error) GenerateTransactionHandler func(sender string, receiver string, amount string, code string) (*transaction.Transaction, error) CreateTransactionHandler func(nonce uint64, value string, receiver string, receiverUsername []byte, sender string, senderUsername []byte, gasPrice uint64, gasLimit uint64, data []byte, signatureHex string, chainID string, version, options uint32) (*transaction.Transaction, []byte, error) ValidateTransactionHandler func(tx *transaction.Transaction) error ValidateTransactionForSimulationCalled func(tx *transaction.Transaction, bypassSignature bool) error GetTransactionHandler func(hash string, withEvents bool) (*transaction.ApiTransactionResult, error) SendBulkTransactionsHandler func(txs []*transaction.Transaction) (uint64, error) GetAccountHandler func(address string) (state.UserAccountHandler, error) GetCodeCalled func(state.UserAccountHandler) []byte GetCurrentPublicKeyHandler func() string GenerateAndSendBulkTransactionsHandler func(destination string, value *big.Int, nrTransactions uint64) error GenerateAndSendBulkTransactionsOneByOneHandler func(destination string, value *big.Int, nrTransactions uint64) error GetHeartbeatsHandler func() []data.PubKeyHeartbeat ValidatorStatisticsApiCalled func() (map[string]*state.ValidatorApiResponse, error) DirectTriggerCalled func(epoch uint32, withEarlyEndOfEpoch bool) error IsSelfTriggerCalled func() bool GetQueryHandlerCalled func(name string) (debug.QueryHandler, error) GetValueForKeyCalled func(address string, key string) (string, error) GetPeerInfoCalled func(pid string) ([]core.QueryP2PPeerInfo, error) GetBlockByHashCalled func(hash string, withTxs bool) (*api.Block, error) GetBlockByNonceCalled func(nonce uint64, withTxs bool) (*api.Block, error) GetUsernameCalled func(address string) (string, error) GetESDTDataCalled func(address string, key string, nonce uint64) (*esdt.ESDigitalToken, error) GetAllESDTTokensCalled func(address string) (map[string]*esdt.ESDigitalToken, error) GetNFTTokenIDsRegisteredByAddressCalled func(address string) ([]string, error) GetESDTsWithRoleCalled func(address string, role string) ([]string, error) GetKeyValuePairsCalled func(address string) (map[string]string, error) GetAllIssuedESDTsCalled func(tokenType string) ([]string, error) }
NodeStub -
func (*NodeStub) CreateTransaction ¶ added in v1.0.102
func (ns *NodeStub) CreateTransaction(nonce uint64, value string, receiver string, receiverUsername []byte, sender string, senderUsername []byte, gasPrice uint64, gasLimit uint64, data []byte, signatureHex string, chainID string, version uint32, options uint32) (*transaction.Transaction, []byte, error)
CreateTransaction -
func (*NodeStub) DecodeAddressPubkey ¶ added in v1.0.104
DecodeAddressPubkey -
func (*NodeStub) DirectTrigger ¶ added in v1.0.102
DirectTrigger -
func (*NodeStub) EncodeAddressPubkey ¶ added in v1.0.104
EncodeAddressPubkey -
func (*NodeStub) GetAccount ¶ added in v1.0.102
func (ns *NodeStub) GetAccount(address string) (state.UserAccountHandler, error)
GetAccount -
func (*NodeStub) GetAllESDTTokens ¶ added in v1.1.12
GetAllESDTTokens -
func (*NodeStub) GetAllIssuedESDTs ¶ added in v1.1.42
GetAllIssuedESDTs -
func (*NodeStub) GetBalance ¶ added in v1.0.102
GetBalance -
func (*NodeStub) GetBlockByHash ¶ added in v1.0.147
GetBlockByHash -
func (*NodeStub) GetBlockByNonce ¶ added in v1.0.147
GetBlockByNonce -
func (*NodeStub) GetCode ¶ added in v1.1.22
func (ns *NodeStub) GetCode(account state.UserAccountHandler) []byte
GetCode -
func (*NodeStub) GetESDTData ¶ added in v1.1.39
func (ns *NodeStub) GetESDTData(address, tokenID string, nonce uint64) (*esdt.ESDigitalToken, error)
GetESDTData -
func (*NodeStub) GetESDTsWithRole ¶ added in v1.1.58
GetESDTsWithRole -
func (*NodeStub) GetHeartbeats ¶ added in v1.0.102
func (ns *NodeStub) GetHeartbeats() []data.PubKeyHeartbeat
GetHeartbeats -
func (*NodeStub) GetKeyValuePairs ¶ added in v1.1.29
GetKeyValuesPairs -
func (*NodeStub) GetNFTTokenIDsRegisteredByAddress ¶ added in v1.1.58
GetNFTTokenIDsRegisteredByAddress -
func (*NodeStub) GetPeerInfo ¶ added in v1.0.130
func (ns *NodeStub) GetPeerInfo(pid string) ([]core.QueryP2PPeerInfo, error)
GetPeerInfo -
func (*NodeStub) GetQueryHandler ¶ added in v1.0.110
func (ns *NodeStub) GetQueryHandler(name string) (debug.QueryHandler, error)
GetQueryHandler -
func (*NodeStub) GetTransaction ¶ added in v1.0.102
func (ns *NodeStub) GetTransaction(hash string, withEvents bool) (*transaction.ApiTransactionResult, error)
GetTransaction -
func (*NodeStub) GetUsername ¶ added in v1.1.1
GetUsername -
func (*NodeStub) GetValueForKey ¶ added in v1.0.125
GetValueForKey -
func (*NodeStub) IsInterfaceNil ¶ added in v1.0.102
IsInterfaceNil returns true if there is no value under the interface
func (*NodeStub) IsSelfTrigger ¶ added in v1.0.102
IsSelfTrigger -
func (*NodeStub) SendBulkTransactions ¶ added in v1.0.102
func (ns *NodeStub) SendBulkTransactions(txs []*transaction.Transaction) (uint64, error)
SendBulkTransactions -
func (*NodeStub) ValidateTransaction ¶ added in v1.0.102
func (ns *NodeStub) ValidateTransaction(tx *transaction.Transaction) error
ValidateTransaction -
func (*NodeStub) ValidateTransactionForSimulation ¶ added in v1.1.4
func (ns *NodeStub) ValidateTransactionForSimulation(tx *transaction.Transaction, bypassSignature bool) error
ValidateTransactionForSimulation -
func (*NodeStub) ValidatorStatisticsApi ¶ added in v1.0.102
func (ns *NodeStub) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse, error)
ValidatorStatisticsApi -
type SyncTimerMock ¶
type SyncTimerMock struct { StartSyncingTimeCalled func() ClockOffsetCalled func() time.Duration FormattedCurrentTimeCalled func() string CurrentTimeCalled func() time.Time }
SyncTimerMock is a mock implementation of SyncTimer interface
func (*SyncTimerMock) ClockOffset ¶
func (stm *SyncTimerMock) ClockOffset() time.Duration
ClockOffset is a mock implementation for ClockOffset
func (*SyncTimerMock) CurrentTime ¶
func (stm *SyncTimerMock) CurrentTime() time.Time
CurrentTime is a mock implementation for CurrentTime
func (*SyncTimerMock) FormattedCurrentTime ¶
func (stm *SyncTimerMock) FormattedCurrentTime() string
FormattedCurrentTime is a mock implementation for FormattedCurrentTime
func (*SyncTimerMock) IsInterfaceNil ¶
func (stm *SyncTimerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerMock) StartSyncingTime ¶ added in v1.0.116
func (stm *SyncTimerMock) StartSyncingTime()
StartSyncingTime is a mock implementation for StartSyncingTime
type TrieStub ¶ added in v1.2.0
type TrieStub struct { GetCalled func(key []byte) ([]byte, error) UpdateCalled func(key, value []byte) error DeleteCalled func(key []byte) error RootCalled func() ([]byte, error) CommitCalled func() error RecreateCalled func(root []byte) (data.Trie, error) ResetOldHashesCalled func() [][]byte AppendToOldHashesCalled func([][]byte) GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error) GetSerializedNodeCalled func(hash []byte) ([]byte, error) GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, error) GetAllHashesCalled func() ([][]byte, error) ClosePersisterCalled func() error GetProofCalled func(key []byte) ([][]byte, error) VerifyProofCalled func(key []byte, proof [][]byte) (bool, error) GetStorageManagerCalled func() data.StorageManager GetNumNodesCalled func() data.NumNodesDTO }
TrieStub -
func (*TrieStub) AppendToOldHashes ¶ added in v1.2.0
AppendToOldHashes appends the given hashes to the trie's oldHashes variable
func (*TrieStub) GetAllHashes ¶ added in v1.2.0
GetAllHashes -
func (*TrieStub) GetAllLeavesOnChannel ¶ added in v1.2.0
func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
GetAllLeavesOnChannel -
func (*TrieStub) GetDirtyHashes ¶ added in v1.2.0
func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
GetDirtyHashes -
func (*TrieStub) GetNumNodes ¶ added in v1.2.0
func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
GetNumNodes -
func (*TrieStub) GetSerializedNode ¶ added in v1.2.0
GetSerializedNode -
func (*TrieStub) GetSerializedNodes ¶ added in v1.2.0
GetSerializedNodes -
func (*TrieStub) GetStorageManager ¶ added in v1.2.0
func (ts *TrieStub) GetStorageManager() data.StorageManager
GetStorageManager -
func (*TrieStub) IsInterfaceNil ¶ added in v1.2.0
IsInterfaceNil returns true if there is no value under the interface
func (*TrieStub) ResetOldHashes ¶ added in v1.2.0
ResetOldHashes resets the oldHashes and oldRoot variables and returns the old hashes
func (*TrieStub) SetNewHashes ¶ added in v1.2.0
func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
SetNewHashes -
type TxExecutionSimulatorStub ¶ added in v1.1.1
type TxExecutionSimulatorStub struct {
ProcessTxCalled func(tx *transaction.Transaction) (*transaction.SimulationResults, error)
}
TxExecutionSimulatorStub -
func (*TxExecutionSimulatorStub) IsInterfaceNil ¶ added in v1.1.1
func (t *TxExecutionSimulatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxExecutionSimulatorStub) ProcessTx ¶ added in v1.1.1
func (t *TxExecutionSimulatorStub) ProcessTx(tx *transaction.Transaction) (*transaction.SimulationResults, error)
ProcessTx -