Documentation ¶
Index ¶
- Variables
- type AccountsParserStub
- func (aps *AccountsParserStub) GetInitialAccountsForDelegated(addressBytes []byte) []genesis.InitialAccountHandler
- func (aps *AccountsParserStub) GetTotalStakedForDelegationAddress(delegationAddress string) *big.Int
- func (aps *AccountsParserStub) InitialAccounts() []genesis.InitialAccountHandler
- func (aps *AccountsParserStub) InitialAccountsSplitOnAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
- func (aps *AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
- func (aps *AccountsParserStub) IsInterfaceNil() bool
- 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) (map[string][]byte, error)
- func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, 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) (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)
- func (as *AccountsStub) SnapshotState(rootHash []byte)
- type BaseAccountMock
- type BlockChainHookHandlerMock
- func (e *BlockChainHookHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
- func (e *BlockChainHookHandlerMock) CleanTempAccounts()
- func (e *BlockChainHookHandlerMock) GetBuiltInFunctions() process.BuiltInFunctionContainer
- func (e *BlockChainHookHandlerMock) IsInterfaceNil() bool
- func (e *BlockChainHookHandlerMock) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
- func (e *BlockChainHookHandlerMock) SetCurrentHeader(hdr data.HeaderHandler)
- func (e *BlockChainHookHandlerMock) TempAccount(address []byte) state.AccountHandler
- type BlockChainStub
- func (bcs *BlockChainStub) CreateNewHeader() data.HeaderHandler
- func (bcs *BlockChainStub) GetCurrentBlockHeader() data.HeaderHandler
- func (bcs *BlockChainStub) GetCurrentBlockHeaderHash() []byte
- func (bcs *BlockChainStub) GetGenesisHeader() data.HeaderHandler
- func (bcs *BlockChainStub) GetGenesisHeaderHash() []byte
- func (bcs *BlockChainStub) IsInterfaceNil() bool
- func (bcs *BlockChainStub) SetCurrentBlockHeader(header data.HeaderHandler) error
- func (bcs *BlockChainStub) SetCurrentBlockHeaderHash(hash []byte)
- func (bcs *BlockChainStub) SetGenesisHeader(genesisBlock data.HeaderHandler) error
- func (bcs *BlockChainStub) SetGenesisHeaderHash(hash []byte)
- type ChainStorerMock
- func (csm *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (csm *ChainStorerMock) CloseAll() error
- func (csm *ChainStorerMock) Destroy() error
- func (csm *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (csm *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (csm *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (csm *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (csm *ChainStorerMock) IsInterfaceNil() bool
- func (csm *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (csm *ChainStorerMock) SetEpochForPutOperation(epoch uint32)
- type CoordinatorStub
- func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *CoordinatorStub) IsInterfaceNil() bool
- func (coordinator *CoordinatorStub) NumberOfShards() uint32
- func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *CoordinatorStub) SelfId() uint32
- type DeployProcessorStub
- type GenesisNodeInfoHandlerMock
- type HasherMock
- type ImportStartHandlerStub
- func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
- func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
- func (ish *ImportStartHandlerStub) ResetStartImport() error
- func (ish *ImportStartHandlerStub) SetStartImport() error
- func (ish *ImportStartHandlerStub) ShouldStartImport() bool
- type InitialNodesHandlerStub
- type InitialNodesSetupHandlerStub
- type KeyGenMock
- func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type KeyGeneratorStub
- func (kgs *KeyGeneratorStub) CheckPublicKeyValid(b []byte) error
- func (kgs *KeyGeneratorStub) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (kgs *KeyGeneratorStub) IsInterfaceNil() bool
- func (kgs *KeyGeneratorStub) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
- func (kgs *KeyGeneratorStub) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (kgs *KeyGeneratorStub) Suite() crypto.Suite
- type MarshalizerMock
- type MemDbMock
- func (s *MemDbMock) Close() error
- func (s *MemDbMock) Destroy() error
- func (s *MemDbMock) DestroyClosed() error
- func (s *MemDbMock) Get(key []byte) ([]byte, error)
- func (s *MemDbMock) Has(key []byte) error
- func (s *MemDbMock) Init() error
- func (s *MemDbMock) IsInterfaceNil() bool
- func (s *MemDbMock) Put(key, val []byte) error
- func (s *MemDbMock) Remove(key []byte) error
- type NodeInfoMock
- type NodesListSplitterStub
- type PrivateKeyMock
- type PubkeyConverterMock
- type PubkeyConverterStub
- type PublicKeyMock
- type QueryServiceStub
- type ShardCoordinatorMock
- func (scm *ShardCoordinatorMock) CommunicationIdentifier(_ uint32) string
- func (scm *ShardCoordinatorMock) ComputeId(address []byte) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm *ShardCoordinatorMock) NumberOfShards() uint32
- func (scm *ShardCoordinatorMock) SameShard(address1, address2 []byte) bool
- func (scm *ShardCoordinatorMock) SelfId() uint32
- type SmartContractParserStub
- func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
- func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
- func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
- func (scps *SmartContractParserStub) IsInterfaceNil() bool
- type StorageManagerStub
- func (sms *StorageManagerStub) CancelPrune([]byte, data.TriePruningIdentifier)
- func (sms *StorageManagerStub) Database() data.DBWriteCacher
- func (sms *StorageManagerStub) EnterSnapshotMode()
- func (sms *StorageManagerStub) ExitSnapshotMode()
- func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
- func (sms *StorageManagerStub) IsInterfaceNil() bool
- func (sms *StorageManagerStub) IsPruningEnabled() bool
- func (sms *StorageManagerStub) MarkForEviction(d []byte, m data.ModifiedHashes) error
- func (sms *StorageManagerStub) Prune([]byte, data.TriePruningIdentifier)
- func (sms *StorageManagerStub) SetCheckpoint([]byte)
- func (sms *StorageManagerStub) TakeSnapshot([]byte)
- type StorerMock
- func (sm *StorerMock) ClearCache()
- func (sm *StorerMock) Close() error
- func (sm *StorerMock) DestroyUnit() error
- func (sm *StorerMock) Get(key []byte) ([]byte, error)
- func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) Has(_ []byte) error
- func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
- func (sm *StorerMock) Remove(key []byte) error
- func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
- type TxExecutionProcessorStub
- func (teps *TxExecutionProcessorStub) AddBalance(senderBytes []byte, value *big.Int) error
- func (teps *TxExecutionProcessorStub) AddNonce(senderBytes []byte, nonce uint64) error
- func (teps *TxExecutionProcessorStub) ExecuteTransaction(nonce uint64, sndAddr []byte, rcvAddress []byte, value *big.Int, data []byte) error
- func (teps *TxExecutionProcessorStub) GetAccount(address []byte) (state.UserAccountHandler, bool)
- func (teps *TxExecutionProcessorStub) GetNonce(senderBytes []byte) (uint64, error)
- func (teps *TxExecutionProcessorStub) IsInterfaceNil() bool
- type TxLogProcessorMock
- type TxProcessorStub
- type Uint64ByteSliceConverterMock
- type UserAccountMock
- func (uam *UserAccountMock) AddToBalance(value *big.Int) error
- func (uam *UserAccountMock) AddToDeveloperReward(_ *big.Int)
- func (uam *UserAccountMock) ChangeOwnerAddress(_ []byte, _ []byte) error
- func (uam *UserAccountMock) ClaimDeveloperRewards(_ []byte) (*big.Int, error)
- func (uam *UserAccountMock) DataTrie() data.Trie
- func (uam *UserAccountMock) DataTrieTracker() state.DataTrieTracker
- func (uam *UserAccountMock) GetBalance() *big.Int
- func (uam *UserAccountMock) GetCode() []byte
- func (uam UserAccountMock) GetCodeHash() []byte
- func (uam *UserAccountMock) GetCodeMetadata() []byte
- func (uam *UserAccountMock) GetDeveloperReward() *big.Int
- func (uam *UserAccountMock) GetOwnerAddress() []byte
- func (uam *UserAccountMock) GetRootHash() []byte
- func (uam *UserAccountMock) GetUserName() []byte
- func (uam *UserAccountMock) SetCode(code []byte)
- func (uam *UserAccountMock) SetCodeHash(bytes []byte)
- func (uam *UserAccountMock) SetCodeMetadata(codeMetadata []byte)
- func (uam *UserAccountMock) SetDataTrie(_ data.Trie)
- func (uam *UserAccountMock) SetOwnerAddress(_ []byte)
- func (uam *UserAccountMock) SetRootHash(bytes []byte)
- func (uam *UserAccountMock) SetUserName(_ []byte)
- func (uam *UserAccountMock) SubFromBalance(value *big.Int) error
Constants ¶
This section is empty.
Variables ¶
var ErrNegativeValue = errors.New("negative value provided")
ErrNegativeValue -
Functions ¶
This section is empty.
Types ¶
type AccountsParserStub ¶
type AccountsParserStub struct { InitialAccountsSplitOnAddressesShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error) InitialAccountsSplitOnDelegationAddressesShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error) InitialAccountsCalled func() []genesis.InitialAccountHandler GetTotalStakedForDelegationAddressCalled func(delegationAddress string) *big.Int GetInitialAccountsForDelegatedCalled func(addressBytes []byte) []genesis.InitialAccountHandler }
AccountsParserStub -
func (*AccountsParserStub) GetInitialAccountsForDelegated ¶
func (aps *AccountsParserStub) GetInitialAccountsForDelegated(addressBytes []byte) []genesis.InitialAccountHandler
GetInitialAccountsForDelegated -
func (*AccountsParserStub) GetTotalStakedForDelegationAddress ¶
func (aps *AccountsParserStub) GetTotalStakedForDelegationAddress(delegationAddress string) *big.Int
GetTotalStakedForDelegationAddress -
func (*AccountsParserStub) InitialAccounts ¶
func (aps *AccountsParserStub) InitialAccounts() []genesis.InitialAccountHandler
InitialAccounts -
func (*AccountsParserStub) InitialAccountsSplitOnAddressesShards ¶
func (aps *AccountsParserStub) InitialAccountsSplitOnAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
InitialAccountsSplitOnAddressesShards -
func (*AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards ¶
func (aps *AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
InitialAccountsSplitOnDelegationAddressesShards -
func (*AccountsParserStub) IsInterfaceNil ¶
func (aps *AccountsParserStub) IsInterfaceNil() bool
IsInterfaceNil -
type AccountsStub ¶
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) (map[string][]byte, error) RecreateAllTriesCalled func(rootHash []byte) (map[string]data.Trie, error) }
AccountsStub -
func (*AccountsStub) AddJournalEntry ¶
func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)
AddJournalEntry -
func (*AccountsStub) CancelPrune ¶
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) GetAllLeaves ¶
func (as *AccountsStub) GetAllLeaves(rootHash []byte) (map[string][]byte, error)
GetAllLeaves -
func (*AccountsStub) GetExistingAccount ¶
func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) IsInterfaceNil ¶
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) LoadAccount ¶
func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)
LoadAccount -
func (*AccountsStub) PruneTrie ¶
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
PruneTrie -
func (*AccountsStub) RecreateAllTries ¶
RecreateAllTries -
func (*AccountsStub) RecreateTrie ¶
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RemoveAccount ¶
func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveAccount ¶
func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte)
SnapshotState -
type BaseAccountMock ¶
BaseAccountMock -
func (*BaseAccountMock) AddressBytes ¶
func (bam *BaseAccountMock) AddressBytes() []byte
AddressBytes -
func (*BaseAccountMock) IncreaseNonce ¶
func (bam *BaseAccountMock) IncreaseNonce(nonce uint64)
IncreaseNonce -
func (*BaseAccountMock) IsInterfaceNil ¶
func (bam *BaseAccountMock) IsInterfaceNil() bool
IsInterfaceNil -
type BlockChainHookHandlerMock ¶
type BlockChainHookHandlerMock struct { AddTempAccountCalled func(address []byte, balance *big.Int, nonce uint64) CleanTempAccountsCalled func() TempAccountCalled func(address []byte) state.AccountHandler SetCurrentHeaderCalled func(hdr data.HeaderHandler) NewAddressCalled func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) }
BlockChainHookHandlerMock -
func (*BlockChainHookHandlerMock) AddTempAccount ¶
func (e *BlockChainHookHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
AddTempAccount -
func (*BlockChainHookHandlerMock) CleanTempAccounts ¶
func (e *BlockChainHookHandlerMock) CleanTempAccounts()
CleanTempAccounts -
func (*BlockChainHookHandlerMock) GetBuiltInFunctions ¶
func (e *BlockChainHookHandlerMock) GetBuiltInFunctions() process.BuiltInFunctionContainer
GetBuiltInFunctions -
func (*BlockChainHookHandlerMock) IsInterfaceNil ¶
func (e *BlockChainHookHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockChainHookHandlerMock) NewAddress ¶
func (e *BlockChainHookHandlerMock) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
NewAddress -
func (*BlockChainHookHandlerMock) SetCurrentHeader ¶
func (e *BlockChainHookHandlerMock) SetCurrentHeader(hdr data.HeaderHandler)
SetCurrentHeader -
func (*BlockChainHookHandlerMock) TempAccount ¶
func (e *BlockChainHookHandlerMock) TempAccount(address []byte) state.AccountHandler
TempAccount -
type BlockChainStub ¶
type BlockChainStub struct { GetGenesisHeaderCalled func() data.HeaderHandler SetGenesisHeaderCalled func(handler data.HeaderHandler) error GetGenesisHeaderHashCalled func() []byte SetGenesisHeaderHashCalled func([]byte) GetCurrentBlockHeaderCalled func() data.HeaderHandler SetCurrentBlockHeaderCalled func(data.HeaderHandler) error GetCurrentBlockHeaderHashCalled func() []byte SetCurrentBlockHeaderHashCalled func([]byte) CreateNewHeaderCalled func() data.HeaderHandler }
BlockChainStub is a mock implementation of the blockchain interface
func (*BlockChainStub) CreateNewHeader ¶
func (bcs *BlockChainStub) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*BlockChainStub) GetCurrentBlockHeader ¶
func (bcs *BlockChainStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader returns current block header pointer
func (*BlockChainStub) GetCurrentBlockHeaderHash ¶
func (bcs *BlockChainStub) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainStub) GetGenesisHeader ¶
func (bcs *BlockChainStub) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader returns the genesis block header pointer
func (*BlockChainStub) GetGenesisHeaderHash ¶
func (bcs *BlockChainStub) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash returns the genesis block header hash
func (*BlockChainStub) IsInterfaceNil ¶
func (bcs *BlockChainStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockChainStub) SetCurrentBlockHeader ¶
func (bcs *BlockChainStub) SetCurrentBlockHeader(header data.HeaderHandler) error
SetCurrentBlockHeader sets current block header pointer
func (*BlockChainStub) SetCurrentBlockHeaderHash ¶
func (bcs *BlockChainStub) SetCurrentBlockHeaderHash(hash []byte)
SetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainStub) SetGenesisHeader ¶
func (bcs *BlockChainStub) SetGenesisHeader(genesisBlock data.HeaderHandler) error
SetGenesisHeader sets the genesis block header pointer
func (*BlockChainStub) SetGenesisHeaderHash ¶
func (bcs *BlockChainStub) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash sets the genesis block header hash
type ChainStorerMock ¶
type ChainStorerMock struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) DestroyCalled func() error CloseAllCalled func() error SetEpochForPutOperationCalled func(epoch uint32) }
ChainStorerMock is a mock implementation of the ChainStorer interface
func (*ChainStorerMock) AddStorer ¶
func (csm *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (csm *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (csm *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (csm *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetStorer ¶
func (csm *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (csm *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (csm *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (csm *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) SetEpochForPutOperation ¶
func (csm *ChainStorerMock) SetEpochForPutOperation(epoch uint32)
SetEpochForPutOperation -
type CoordinatorStub ¶
type CoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
CoordinatorStub -
func (*CoordinatorStub) CommunicationIdentifier ¶
func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*CoordinatorStub) ComputeId ¶
func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*CoordinatorStub) IsInterfaceNil ¶
func (coordinator *CoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CoordinatorStub) NumberOfShards ¶
func (coordinator *CoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*CoordinatorStub) SameShard ¶
func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
type DeployProcessorStub ¶
type DeployProcessorStub struct { DeployCalled func(sc genesis.InitialSmartContractHandler) error SetReplacePlaceholdersCalled func(handler func(txData string, scResultingAddressBytes []byte) (string, error)) }
DeployProcessorStub -
func (*DeployProcessorStub) Deploy ¶
func (dps *DeployProcessorStub) Deploy(sc genesis.InitialSmartContractHandler) error
Deploy -
func (*DeployProcessorStub) IsInterfaceNil ¶
func (dps *DeployProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type GenesisNodeInfoHandlerMock ¶
type GenesisNodeInfoHandlerMock struct { AssignedShardValue uint32 AddressBytesValue []byte PubKeyBytesValue []byte }
GenesisNodeInfoHandlerMock -
func (*GenesisNodeInfoHandlerMock) AddressBytes ¶
func (gnihm *GenesisNodeInfoHandlerMock) AddressBytes() []byte
AddressBytes -
func (*GenesisNodeInfoHandlerMock) AssignedShard ¶
func (gnihm *GenesisNodeInfoHandlerMock) AssignedShard() uint32
AssignedShard -
func (*GenesisNodeInfoHandlerMock) IsInterfaceNil ¶
func (gnihm *GenesisNodeInfoHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GenesisNodeInfoHandlerMock) PubKeyBytes ¶
func (gnihm *GenesisNodeInfoHandlerMock) PubKeyBytes() []byte
PubKeyBytes -
type HasherMock ¶
type HasherMock struct { }
HasherMock that will be used for testing
func (HasherMock) Compute ¶
func (sha HasherMock) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (HasherMock) EmptyHash ¶
func (sha HasherMock) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (HasherMock) IsInterfaceNil ¶
func (sha HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ImportStartHandlerStub ¶ added in v1.0.133
type ImportStartHandlerStub struct { SetStartImportCalled func() error ResetStartImportCalled func() error ShouldStartImportCalled func() bool IsAfterExportBeforeImportCalled func() bool }
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type InitialNodesHandlerStub ¶
type InitialNodesHandlerStub struct { InitialNodesInfoCalled func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler) MinNumberOfNodesCalled func() uint32 }
InitialNodesHandlerStub -
func (*InitialNodesHandlerStub) InitialNodesInfo ¶
func (inhs *InitialNodesHandlerStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*InitialNodesHandlerStub) IsInterfaceNil ¶
func (inhs *InitialNodesHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InitialNodesHandlerStub) MinNumberOfNodes ¶
func (inhs *InitialNodesHandlerStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
type InitialNodesSetupHandlerStub ¶
type InitialNodesSetupHandlerStub struct { InitialNodesInfoCalled func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler) MinNumberOfNodesCalled func() uint32 }
InitialNodesSetupHandlerStub -
func (*InitialNodesSetupHandlerStub) InitialNodesInfo ¶
func (inshs *InitialNodesSetupHandlerStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*InitialNodesSetupHandlerStub) IsInterfaceNil ¶
func (inshs *InitialNodesSetupHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InitialNodesSetupHandlerStub) MinNumberOfNodes ¶
func (inshs *InitialNodesSetupHandlerStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
type KeyGenMock ¶ added in v1.0.120
type KeyGenMock struct { }
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶ added in v1.0.120
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*KeyGenMock) GeneratePair ¶ added in v1.0.120
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶ added in v1.0.120
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶ added in v1.0.120
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶ added in v1.0.120
func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type KeyGeneratorStub ¶ added in v1.0.120
type KeyGeneratorStub struct { GeneratePairCalled func() (crypto.PrivateKey, crypto.PublicKey) PrivateKeyFromByteArrayCalled func(b []byte) (crypto.PrivateKey, error) PublicKeyFromByteArrayCalled func(b []byte) (crypto.PublicKey, error) CheckPublicKeyValidCalled func(b []byte) error SuiteCalled func() crypto.Suite }
KeyGeneratorStub -
func (*KeyGeneratorStub) CheckPublicKeyValid ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) CheckPublicKeyValid(b []byte) error
CheckPublicKeyValid -
func (*KeyGeneratorStub) GeneratePair ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGeneratorStub) IsInterfaceNil ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*KeyGeneratorStub) PrivateKeyFromByteArray ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGeneratorStub) PublicKeyFromByteArray ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
func (*KeyGeneratorStub) Suite ¶ added in v1.0.120
func (kgs *KeyGeneratorStub) Suite() crypto.Suite
Suite -
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MemDbMock ¶
type MemDbMock struct {
// contains filtered or unexported fields
}
MemDbMock represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map
func (*MemDbMock) DestroyClosed ¶
DestroyClosed removes the already closed storage medium stored data
func (*MemDbMock) Has ¶
Has returns true if the given key is present in the persistence medium, false otherwise
func (*MemDbMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type NodeInfoMock ¶
type NodeInfoMock struct {
// contains filtered or unexported fields
}
NodeInfoMock -
func NewNodeInfo ¶
func NewNodeInfo(address []byte, pubKey []byte, shardId uint32) *NodeInfoMock
NewNodeInfo -
type NodesListSplitterStub ¶
type NodesListSplitterStub struct { GetAllNodesCalled func() []sharding.GenesisNodeInfoHandler GetDelegatedNodesCalled func(delegationScAddress []byte) []sharding.GenesisNodeInfoHandler }
NodesListSplitterStub -
func (*NodesListSplitterStub) GetAllNodes ¶
func (nlss *NodesListSplitterStub) GetAllNodes() []sharding.GenesisNodeInfoHandler
GetAllNodes -
func (*NodesListSplitterStub) GetDelegatedNodes ¶
func (nlss *NodesListSplitterStub) GetDelegatedNodes(delegationScAddress []byte) []sharding.GenesisNodeInfoHandler
GetDelegatedNodes -
func (*NodesListSplitterStub) IsInterfaceNil ¶
func (nlss *NodesListSplitterStub) IsInterfaceNil() bool
IsInterfaceNil -
type PrivateKeyMock ¶ added in v1.0.120
type PrivateKeyMock struct { }
PrivateKeyMock -
func (*PrivateKeyMock) GeneratePublic ¶ added in v1.0.120
func (sk *PrivateKeyMock) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyMock) IsInterfaceNil ¶ added in v1.0.120
func (sk *PrivateKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyMock) Scalar ¶ added in v1.0.120
func (sk *PrivateKeyMock) Scalar() crypto.Scalar
Scalar -
func (*PrivateKeyMock) Suite ¶ added in v1.0.120
func (sk *PrivateKeyMock) Suite() crypto.Suite
Suite -
func (*PrivateKeyMock) ToByteArray ¶ added in v1.0.120
func (sk *PrivateKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type PubkeyConverterMock ¶
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type PubkeyConverterStub ¶
type PubkeyConverterStub struct { LenCalled func() int DecodeCalled func(humanReadable string) ([]byte, error) EncodeCalled func(pkBytes []byte) string }
PubkeyConverterStub -
func (*PubkeyConverterStub) Decode ¶
func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterStub) Encode ¶
func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterStub) IsInterfaceNil ¶
func (pcs *PubkeyConverterStub) IsInterfaceNil() bool
IsInterfaceNil -
type PublicKeyMock ¶ added in v1.0.120
type PublicKeyMock struct { }
PublicKeyMock -
func (*PublicKeyMock) IsInterfaceNil ¶ added in v1.0.120
func (sspk *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) Point ¶ added in v1.0.120
func (sspk *PublicKeyMock) Point() crypto.Point
Point -
func (*PublicKeyMock) Suite ¶ added in v1.0.120
func (sspk *PublicKeyMock) Suite() crypto.Suite
Suite -
func (*PublicKeyMock) ToByteArray ¶ added in v1.0.120
func (sspk *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type QueryServiceStub ¶ added in v1.0.116
type QueryServiceStub struct { ComputeScCallGasLimitCalled func(tx *transaction.Transaction) (uint64, error) ExecuteQueryCalled func(query *process.SCQuery) (*vmcommon.VMOutput, error) }
QueryServiceStub -
func (*QueryServiceStub) ComputeScCallGasLimit ¶ added in v1.0.116
func (qss *QueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit -
func (*QueryServiceStub) ExecuteQuery ¶ added in v1.0.116
ExecuteQuery -
func (*QueryServiceStub) IsInterfaceNil ¶ added in v1.0.116
func (qss *QueryServiceStub) IsInterfaceNil() bool
IsInterfaceNil -
type ShardCoordinatorMock ¶
ShardCoordinatorMock -
func (*ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm *ShardCoordinatorMock) CommunicationIdentifier(_ uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorMock) ComputeId ¶
func (scm *ShardCoordinatorMock) ComputeId(address []byte) uint32
ComputeId -
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*ShardCoordinatorMock) NumberOfShards ¶
func (scm *ShardCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorMock) SameShard ¶
func (scm *ShardCoordinatorMock) SameShard(address1, address2 []byte) bool
SameShard -
type SmartContractParserStub ¶
type SmartContractParserStub struct { InitialSmartContractsSplitOnOwnersShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error) InitialSmartContractsCalled func() []genesis.InitialSmartContractHandler GetDeployedSCAddressesCalled func(scType string) (map[string]struct{}, error) }
SmartContractParserStub -
func (*SmartContractParserStub) GetDeployedSCAddresses ¶ added in v1.0.133
func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
GetDeployedSCAddresses -
func (*SmartContractParserStub) InitialSmartContracts ¶
func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
InitialSmartContracts -
func (*SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards ¶
func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
InitialSmartContractsSplitOnOwnersShards -
func (*SmartContractParserStub) IsInterfaceNil ¶
func (scps *SmartContractParserStub) IsInterfaceNil() bool
IsInterfaceNil -
type StorageManagerStub ¶
type StorageManagerStub struct { DatabaseCalled func() data.DBWriteCacher TakeSnapshotCalled func([]byte) SetCheckpointCalled func([]byte) PruneCalled func([]byte) CancelPruneCalled func([]byte) MarkForEvictionCalled func([]byte, data.ModifiedHashes) error GetDbThatContainsHashCalled func([]byte) data.DBWriteCacher GetSnapshotThatContainsHashCalled func(rootHash []byte) data.SnapshotDbHandler IsPruningEnabledCalled func() bool EnterSnapshotModeCalled func() ExitSnapshotModeCalled func() IsInterfaceNilCalled func() bool }
StorageManagerStub --
func (*StorageManagerStub) CancelPrune ¶
func (sms *StorageManagerStub) CancelPrune([]byte, data.TriePruningIdentifier)
CancelPrune --
func (*StorageManagerStub) Database ¶
func (sms *StorageManagerStub) Database() data.DBWriteCacher
Database --
func (*StorageManagerStub) EnterSnapshotMode ¶
func (sms *StorageManagerStub) EnterSnapshotMode()
EnterSnapshotMode --
func (*StorageManagerStub) ExitSnapshotMode ¶
func (sms *StorageManagerStub) ExitSnapshotMode()
ExitSnapshotMode --
func (*StorageManagerStub) GetSnapshotThatContainsHash ¶ added in v1.0.129
func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
GetSnapshotThatContainsHash --
func (*StorageManagerStub) IsInterfaceNil ¶
func (sms *StorageManagerStub) IsInterfaceNil() bool
IsInterfaceNil --
func (*StorageManagerStub) IsPruningEnabled ¶
func (sms *StorageManagerStub) IsPruningEnabled() bool
IsPruningEnabled --
func (*StorageManagerStub) MarkForEviction ¶
func (sms *StorageManagerStub) MarkForEviction(d []byte, m data.ModifiedHashes) error
MarkForEviction --
func (*StorageManagerStub) Prune ¶
func (sms *StorageManagerStub) Prune([]byte, data.TriePruningIdentifier)
Prune --
func (*StorageManagerStub) SetCheckpoint ¶
func (sms *StorageManagerStub) SetCheckpoint([]byte)
SetCheckpoint --
func (*StorageManagerStub) TakeSnapshot ¶
func (sms *StorageManagerStub) TakeSnapshot([]byte)
TakeSnapshot --
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) HasInEpoch ¶
func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
HasInEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) RangeKeys ¶ added in v1.0.138
func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
SearchFirst -
type TxExecutionProcessorStub ¶
type TxExecutionProcessorStub struct { ExecuteTransactionCalled func(nonce uint64, sndAddr []byte, rcvAddress []byte, value *big.Int, data []byte) error AccountExistsCalled func(address []byte) bool GetNonceCalled func(senderBytes []byte) (uint64, error) AddBalanceCalled func(senderBytes []byte, value *big.Int) error AddNonceCalled func(senderBytes []byte, nonce uint64) error }
TxExecutionProcessorStub -
func (*TxExecutionProcessorStub) AddBalance ¶
func (teps *TxExecutionProcessorStub) AddBalance(senderBytes []byte, value *big.Int) error
AddBalance -
func (*TxExecutionProcessorStub) AddNonce ¶
func (teps *TxExecutionProcessorStub) AddNonce(senderBytes []byte, nonce uint64) error
AddNonce -
func (*TxExecutionProcessorStub) ExecuteTransaction ¶
func (teps *TxExecutionProcessorStub) ExecuteTransaction(nonce uint64, sndAddr []byte, rcvAddress []byte, value *big.Int, data []byte) error
ExecuteTransaction -
func (*TxExecutionProcessorStub) GetAccount ¶ added in v1.0.133
func (teps *TxExecutionProcessorStub) GetAccount(address []byte) (state.UserAccountHandler, bool)
GetAccount -
func (*TxExecutionProcessorStub) GetNonce ¶
func (teps *TxExecutionProcessorStub) GetNonce(senderBytes []byte) (uint64, error)
GetNonce -
func (*TxExecutionProcessorStub) IsInterfaceNil ¶
func (teps *TxExecutionProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type TxLogProcessorMock ¶
type TxLogProcessorMock struct { }
TxLogProcessorMock -
func (*TxLogProcessorMock) GetLog ¶
func (tlpm *TxLogProcessorMock) GetLog(_ []byte) (data.LogHandler, error)
GetLog -
func (*TxLogProcessorMock) IsInterfaceNil ¶
func (tlpm *TxLogProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxLogProcessorMock) SaveLog ¶
func (tlpm *TxLogProcessorMock) SaveLog(_ []byte, _ data.TransactionHandler, _ []*vmcommon.LogEntry) error
SaveLog -
type TxProcessorStub ¶
type TxProcessorStub struct {
ProcessTransactionCalled func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
}
TxProcessorStub -
func (*TxProcessorStub) IsInterfaceNil ¶
func (tps *TxProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxProcessorStub) ProcessTransaction ¶
func (tps *TxProcessorStub) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
ProcessTransaction -
type Uint64ByteSliceConverterMock ¶
type Uint64ByteSliceConverterMock struct { }
Uint64ByteSliceConverterMock converts byte slice to/from uint64
func (*Uint64ByteSliceConverterMock) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterMock) ToByteSlice ¶
func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter
type UserAccountMock ¶
type UserAccountMock struct { BaseAccountMock BalanceField *big.Int // contains filtered or unexported fields }
UserAccountMock -
func (*UserAccountMock) AddToBalance ¶
func (uam *UserAccountMock) AddToBalance(value *big.Int) error
AddToBalance -
func (*UserAccountMock) AddToDeveloperReward ¶
func (uam *UserAccountMock) AddToDeveloperReward(_ *big.Int)
AddToDeveloperReward -
func (*UserAccountMock) ChangeOwnerAddress ¶
func (uam *UserAccountMock) ChangeOwnerAddress(_ []byte, _ []byte) error
ChangeOwnerAddress -
func (*UserAccountMock) ClaimDeveloperRewards ¶
func (uam *UserAccountMock) ClaimDeveloperRewards(_ []byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*UserAccountMock) DataTrieTracker ¶
func (uam *UserAccountMock) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*UserAccountMock) GetCodeMetadata ¶
func (uam *UserAccountMock) GetCodeMetadata() []byte
GetCodeMetadata -
func (*UserAccountMock) GetDeveloperReward ¶
func (uam *UserAccountMock) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*UserAccountMock) GetOwnerAddress ¶
func (uam *UserAccountMock) GetOwnerAddress() []byte
GetOwnerAddress -
func (*UserAccountMock) GetRootHash ¶
func (uam *UserAccountMock) GetRootHash() []byte
GetRootHash -
func (*UserAccountMock) GetUserName ¶
func (uam *UserAccountMock) GetUserName() []byte
GetUserName -
func (*UserAccountMock) SetCodeHash ¶
func (uam *UserAccountMock) SetCodeHash(bytes []byte)
SetCodeHash -
func (*UserAccountMock) SetCodeMetadata ¶
func (uam *UserAccountMock) SetCodeMetadata(codeMetadata []byte)
SetCodeMetadata -
func (*UserAccountMock) SetDataTrie ¶
func (uam *UserAccountMock) SetDataTrie(_ data.Trie)
SetDataTrie -
func (*UserAccountMock) SetOwnerAddress ¶
func (uam *UserAccountMock) SetOwnerAddress(_ []byte)
SetOwnerAddress -
func (*UserAccountMock) SetRootHash ¶
func (uam *UserAccountMock) SetRootHash(bytes []byte)
SetRootHash -
func (*UserAccountMock) SetUserName ¶
func (uam *UserAccountMock) SetUserName(_ []byte)
SetUserName -
func (*UserAccountMock) SubFromBalance ¶
func (uam *UserAccountMock) SubFromBalance(value *big.Int) error
SubFromBalance -
Source Files ¶
- accountsParserStub.go
- accountsStub.go
- baseAccountMock.go
- blockChainHookHandlerMock.go
- blockChainStub.go
- chainStorerMock.go
- coordinatorStub.go
- deployProcessorStub.go
- genesisNodeInfoHandlerMock.go
- hasherMock.go
- importStartHandlerStub.go
- initialNodesHandlerStub.go
- initialNodesSetupHandlerStub.go
- keyGeneratorStub.go
- keyMock.go
- marshalizerMock.go
- memDbMock.go
- nodeInfoMock.go
- nodesListSplitterStub.go
- pubkeyConverterMock.go
- pubkeyConverterStub.go
- queryServiceStub.go
- shardCoordinatorMock.go
- smartContractParserStub.go
- storageManagerStub.go
- storerMock.go
- txExecutionProcessorStub.go
- txLogProcessorMock.go
- txProcessorStub.go
- uint64ByteSliceConverterMock.go
- userAccountMock.go