Documentation ¶
Index ¶
- Variables
- type AccountsParserStub
- func (aps *AccountsParserStub) GenerateInitialTransactions(shardCoordinator sharding.Coordinator, ...) ([]*block.MiniBlock, map[uint32]*outport.TransactionPool, error)
- func (aps *AccountsParserStub) GenesisMintingAddress() string
- 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 BaseAccountMock
- 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 CoreComponentsMock
- func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
- func (ccm *CoreComponentsMock) ChainID() string
- func (ccm *CoreComponentsMock) EnableEpochsHandler() common.EnableEpochsHandler
- func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
- func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) IsInterfaceNil() bool
- func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
- func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
- func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
- func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
- type DataComponentsMock
- func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
- func (dcm *DataComponentsMock) Clone() interface{}
- func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
- func (dcm *DataComponentsMock) IsInterfaceNil() bool
- func (dcm *DataComponentsMock) MiniBlocksProvider() MiniBlockProvider
- func (dcm *DataComponentsMock) SetBlockchain(chain data.ChainHandler) error
- func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
- type DeployProcessorStub
- type GenesisNodeInfoHandlerMock
- func (gnihm *GenesisNodeInfoHandlerMock) AddressBytes() []byte
- func (gnihm *GenesisNodeInfoHandlerMock) AssignedShard() uint32
- func (gnihm *GenesisNodeInfoHandlerMock) GetInitialRating() uint32
- func (gnihm *GenesisNodeInfoHandlerMock) IsInterfaceNil() bool
- func (gnihm *GenesisNodeInfoHandlerMock) PubKeyBytes() []byte
- 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
- func (inhs *InitialNodesHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, ...)
- func (inhs *InitialNodesHandlerStub) IsInterfaceNil() bool
- func (inhs *InitialNodesHandlerStub) MinNumberOfNodes() uint32
- func (inhs *InitialNodesHandlerStub) MinNumberOfNodesWithHysteresis() uint32
- type InitialNodesSetupHandlerStub
- func (inshs *InitialNodesSetupHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, ...)
- func (inshs *InitialNodesSetupHandlerStub) IsInterfaceNil() bool
- func (inshs *InitialNodesSetupHandlerStub) MinNumberOfNodes() uint32
- func (inshs *InitialNodesSetupHandlerStub) MinNumberOfNodesWithHysteresis() uint32
- 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 MiniBlockProvider
- type NodeInfoMock
- type NodesListSplitterStub
- type PrivateKeyMock
- type PublicKeyMock
- type QueryServiceStub
- func (qss *QueryServiceStub) Close() error
- func (qss *QueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
- func (qss *QueryServiceStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
- func (qss *QueryServiceStub) IsInterfaceNil() bool
- 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 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) GetExecutedTransactions() []data.TransactionHandler
- func (teps *TxExecutionProcessorStub) GetNonce(senderBytes []byte) (uint64, error)
- func (teps *TxExecutionProcessorStub) IsInterfaceNil() bool
- type TxLogProcessorMock
- func (tlpm *TxLogProcessorMock) Clean()
- func (tlpm *TxLogProcessorMock) GetAllCurrentLogs() []*data.LogData
- func (tlpm *TxLogProcessorMock) GetLog(_ []byte) (data.LogHandler, error)
- func (tlpm *TxLogProcessorMock) IsInterfaceNil() bool
- func (tlpm *TxLogProcessorMock) SaveLog(_ []byte, _ data.TransactionHandler, _ []*vmcommon.LogEntry) error
- 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() common.DataTrieHandler
- func (uam *UserAccountMock) GetAllLeaves(_ *common.TrieIteratorChannels, _ context.Context) error
- 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) HasNewCode() bool
- func (uam *UserAccountMock) IsGuarded() bool
- func (uam *UserAccountMock) RetrieveValue(_ []byte) ([]byte, uint32, error)
- func (uam *UserAccountMock) SaveDirtyData(_ common.Trie) ([]core.TrieData, error)
- func (uam *UserAccountMock) SaveKeyValue(_ []byte, _ []byte) error
- func (uam *UserAccountMock) SetCode(code []byte)
- func (uam *UserAccountMock) SetCodeHash(bytes []byte)
- func (uam *UserAccountMock) SetCodeMetadata(codeMetadata []byte)
- func (uam *UserAccountMock) SetDataTrie(_ common.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 GenerateInitialTransactionsCalled func(shardCoordinator sharding.Coordinator, initialIndexingData map[uint32]*genesis.IndexingData) ([]*block.MiniBlock, map[uint32]*outport.TransactionPool, error) GenesisMintingAddressCalled func() string }
AccountsParserStub -
func (*AccountsParserStub) GenerateInitialTransactions ¶
func (aps *AccountsParserStub) GenerateInitialTransactions(shardCoordinator sharding.Coordinator, initialIndexingData map[uint32]*genesis.IndexingData) ([]*block.MiniBlock, map[uint32]*outport.TransactionPool, error)
GenerateInitialTransactions -
func (*AccountsParserStub) GenesisMintingAddress ¶
func (aps *AccountsParserStub) GenesisMintingAddress() string
GenesisMintingAddress -
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 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 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 CoreComponentsMock ¶
type CoreComponentsMock struct { IntMarsh marshal.Marshalizer TxMarsh marshal.Marshalizer Hash hashing.Hasher TxSignHasherField hashing.Hasher UInt64ByteSliceConv typeConverters.Uint64ByteSliceConverter AddrPubKeyConv core.PubkeyConverter Chain string MinTxVersion uint32 StatHandler core.AppStatusHandler EnableEpochsHandlerField common.EnableEpochsHandler TxVersionCheck process.TxVersionCheckerHandler }
CoreComponentsMock -
func (*CoreComponentsMock) AddressPubKeyConverter ¶
func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
AddressPubKeyConverter -
func (*CoreComponentsMock) EnableEpochsHandler ¶
func (ccm *CoreComponentsMock) EnableEpochsHandler() common.EnableEpochsHandler
EnableEpochsHandler -
func (*CoreComponentsMock) InternalMarshalizer ¶
func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
InternalMarshalizer -
func (*CoreComponentsMock) IsInterfaceNil ¶
func (ccm *CoreComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CoreComponentsMock) MinTransactionVersion ¶
func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
MinTransactionVersion -
func (*CoreComponentsMock) TxMarshalizer ¶
func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
TxMarshalizer -
func (*CoreComponentsMock) TxSignHasher ¶
func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
TxSignHasher -
func (*CoreComponentsMock) TxVersionChecker ¶ added in v1.5.0
func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
TxVersionChecker -
func (*CoreComponentsMock) Uint64ByteSliceConverter ¶
func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
Uint64ByteSliceConverter -
type DataComponentsMock ¶
type DataComponentsMock struct { Storage dataRetriever.StorageService Blkc data.ChainHandler DataPool dataRetriever.PoolsHolder MiniBlockProvider MiniBlockProvider }
DataComponentsMock -
func (*DataComponentsMock) Blockchain ¶
func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
Blockchain -
func (*DataComponentsMock) Datapool ¶
func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
Datapool -
func (*DataComponentsMock) IsInterfaceNil ¶
func (dcm *DataComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*DataComponentsMock) MiniBlocksProvider ¶
func (dcm *DataComponentsMock) MiniBlocksProvider() MiniBlockProvider
MiniBlocksProvider -
func (*DataComponentsMock) SetBlockchain ¶
func (dcm *DataComponentsMock) SetBlockchain(chain data.ChainHandler) error
SetBlockchain -
func (*DataComponentsMock) StorageService ¶
func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
StorageService -
type DeployProcessorStub ¶
type DeployProcessorStub struct { DeployCalled func(sc genesis.InitialSmartContractHandler) ([][]byte, error) SetReplacePlaceholdersCalled func(handler func(txData string, scResultingAddressBytes []byte) (string, error)) }
DeployProcessorStub -
func (*DeployProcessorStub) Deploy ¶
func (dps *DeployProcessorStub) Deploy(sc genesis.InitialSmartContractHandler) ([][]byte, error)
Deploy -
func (*DeployProcessorStub) IsInterfaceNil ¶
func (dps *DeployProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type GenesisNodeInfoHandlerMock ¶
type GenesisNodeInfoHandlerMock struct { AssignedShardValue uint32 AddressBytesValue []byte PubKeyBytesValue []byte InitialRatingValue uint32 }
GenesisNodeInfoHandlerMock -
func (*GenesisNodeInfoHandlerMock) AddressBytes ¶
func (gnihm *GenesisNodeInfoHandlerMock) AddressBytes() []byte
AddressBytes -
func (*GenesisNodeInfoHandlerMock) AssignedShard ¶
func (gnihm *GenesisNodeInfoHandlerMock) AssignedShard() uint32
AssignedShard -
func (*GenesisNodeInfoHandlerMock) GetInitialRating ¶
func (gnihm *GenesisNodeInfoHandlerMock) GetInitialRating() uint32
GetInitialRating -
func (*GenesisNodeInfoHandlerMock) IsInterfaceNil ¶
func (gnihm *GenesisNodeInfoHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GenesisNodeInfoHandlerMock) PubKeyBytes ¶
func (gnihm *GenesisNodeInfoHandlerMock) PubKeyBytes() []byte
PubKeyBytes -
type ImportStartHandlerStub ¶
type ImportStartHandlerStub struct { SetStartImportCalled func() error ResetStartImportCalled func() error ShouldStartImportCalled func() bool IsAfterExportBeforeImportCalled func() bool }
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type InitialNodesHandlerStub ¶
type InitialNodesHandlerStub struct { InitialNodesInfoCalled func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler) MinNumberOfNodesCalled func() uint32 MinNumberOfNodesWithHysteresisCalled func() uint32 }
InitialNodesHandlerStub -
func (*InitialNodesHandlerStub) InitialNodesInfo ¶
func (inhs *InitialNodesHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*InitialNodesHandlerStub) IsInterfaceNil ¶
func (inhs *InitialNodesHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InitialNodesHandlerStub) MinNumberOfNodes ¶
func (inhs *InitialNodesHandlerStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*InitialNodesHandlerStub) MinNumberOfNodesWithHysteresis ¶
func (inhs *InitialNodesHandlerStub) MinNumberOfNodesWithHysteresis() uint32
MinNumberOfNodesWithHysteresis -
type InitialNodesSetupHandlerStub ¶
type InitialNodesSetupHandlerStub struct { InitialNodesInfoCalled func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler) MinNumberOfNodesCalled func() uint32 MinNumberOfNodesWithHysteresisCalled func() uint32 }
InitialNodesSetupHandlerStub -
func (*InitialNodesSetupHandlerStub) InitialNodesInfo ¶
func (inshs *InitialNodesSetupHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*InitialNodesSetupHandlerStub) IsInterfaceNil ¶
func (inshs *InitialNodesSetupHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InitialNodesSetupHandlerStub) MinNumberOfNodes ¶
func (inshs *InitialNodesSetupHandlerStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*InitialNodesSetupHandlerStub) MinNumberOfNodesWithHysteresis ¶
func (inshs *InitialNodesSetupHandlerStub) MinNumberOfNodesWithHysteresis() uint32
MinNumberOfNodesWithHysteresis -
type KeyGenMock ¶
type KeyGenMock struct { }
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*KeyGenMock) GeneratePair ¶
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type KeyGeneratorStub ¶
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 ¶
func (kgs *KeyGeneratorStub) CheckPublicKeyValid(b []byte) error
CheckPublicKeyValid -
func (*KeyGeneratorStub) GeneratePair ¶
func (kgs *KeyGeneratorStub) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGeneratorStub) IsInterfaceNil ¶
func (kgs *KeyGeneratorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*KeyGeneratorStub) PrivateKeyFromByteArray ¶
func (kgs *KeyGeneratorStub) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGeneratorStub) PublicKeyFromByteArray ¶
func (kgs *KeyGeneratorStub) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
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 MiniBlockProvider ¶
type MiniBlockProvider interface { GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) IsInterfaceNil() bool }
MiniBlockProvider defines what a miniblock data provider should do
type NodeInfoMock ¶
type NodeInfoMock struct {
// contains filtered or unexported fields
}
NodeInfoMock -
func NewNodeInfo ¶
func NewNodeInfo(address []byte, pubKey []byte, shardId uint32, initialRating uint32) *NodeInfoMock
NewNodeInfo -
func (*NodeInfoMock) GetInitialRating ¶
func (n *NodeInfoMock) GetInitialRating() uint32
GetInitialRating -
type NodesListSplitterStub ¶
type NodesListSplitterStub struct { GetAllNodesCalled func() []nodesCoordinator.GenesisNodeInfoHandler GetDelegatedNodesCalled func(delegationScAddress []byte) []nodesCoordinator.GenesisNodeInfoHandler }
NodesListSplitterStub -
func (*NodesListSplitterStub) GetAllNodes ¶
func (nlss *NodesListSplitterStub) GetAllNodes() []nodesCoordinator.GenesisNodeInfoHandler
GetAllNodes -
func (*NodesListSplitterStub) GetDelegatedNodes ¶
func (nlss *NodesListSplitterStub) GetDelegatedNodes(delegationScAddress []byte) []nodesCoordinator.GenesisNodeInfoHandler
GetDelegatedNodes -
func (*NodesListSplitterStub) IsInterfaceNil ¶
func (nlss *NodesListSplitterStub) IsInterfaceNil() bool
IsInterfaceNil -
type PrivateKeyMock ¶
type PrivateKeyMock struct { }
PrivateKeyMock -
func (*PrivateKeyMock) GeneratePublic ¶
func (sk *PrivateKeyMock) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyMock) IsInterfaceNil ¶
func (sk *PrivateKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyMock) ToByteArray ¶
func (sk *PrivateKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type PublicKeyMock ¶
type PublicKeyMock struct { }
PublicKeyMock -
func (*PublicKeyMock) IsInterfaceNil ¶
func (sspk *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) ToByteArray ¶
func (sspk *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type QueryServiceStub ¶
type QueryServiceStub struct { ComputeScCallGasLimitCalled func(tx *transaction.Transaction) (uint64, error) ExecuteQueryCalled func(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error) CloseCalled func() error }
QueryServiceStub -
func (*QueryServiceStub) ComputeScCallGasLimit ¶
func (qss *QueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit -
func (*QueryServiceStub) ExecuteQuery ¶
func (qss *QueryServiceStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
ExecuteQuery -
func (*QueryServiceStub) IsInterfaceNil ¶
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 ¶
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 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 ¶
func (teps *TxExecutionProcessorStub) GetAccount(address []byte) (state.UserAccountHandler, bool)
GetAccount -
func (*TxExecutionProcessorStub) GetExecutedTransactions ¶
func (teps *TxExecutionProcessorStub) GetExecutedTransactions() []data.TransactionHandler
GetExecutedTransactions -
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) GetAllCurrentLogs ¶
func (tlpm *TxLogProcessorMock) GetAllCurrentLogs() []*data.LogData
GetAllCurrentLogs -
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 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) DataTrie ¶
func (uam *UserAccountMock) DataTrie() common.DataTrieHandler
DataTrie -
func (*UserAccountMock) GetAllLeaves ¶ added in v1.6.0
func (uam *UserAccountMock) GetAllLeaves(_ *common.TrieIteratorChannels, _ context.Context) error
GetAllLeaves -
func (*UserAccountMock) GetCode ¶ added in v1.6.0
func (uam *UserAccountMock) GetCode() []byte
GetCode -
func (*UserAccountMock) GetCodeHash ¶
func (uam *UserAccountMock) GetCodeHash() []byte
GetCodeHash -
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) IsGuarded ¶ added in v1.5.0
func (uam *UserAccountMock) IsGuarded() bool
IsGuarded -
func (*UserAccountMock) RetrieveValue ¶
func (uam *UserAccountMock) RetrieveValue(_ []byte) ([]byte, uint32, error)
RetrieveValue -
func (*UserAccountMock) SaveDirtyData ¶
SaveDirtyData -
func (*UserAccountMock) SaveKeyValue ¶
func (uam *UserAccountMock) SaveKeyValue(_ []byte, _ []byte) error
SaveKeyValue -
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(_ common.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
- baseAccountMock.go
- coordinatorStub.go
- coreComponentsMock.go
- dataComponentsMock.go
- deployProcessorStub.go
- genesisNodeInfoHandlerMock.go
- importStartHandlerStub.go
- initialNodesHandlerStub.go
- initialNodesSetupHandlerStub.go
- keyGeneratorStub.go
- keyMock.go
- marshalizerMock.go
- memDbMock.go
- nodeInfoMock.go
- nodesListSplitterStub.go
- queryServiceStub.go
- shardCoordinatorMock.go
- smartContractParserStub.go
- txExecutionProcessorStub.go
- txLogProcessorMock.go
- uint64ByteSliceConverterMock.go
- userAccountMock.go