Documentation ¶
Index ¶
- type ApiResolverStub
- func (ars *ApiResolverStub) ComputeTransactionGasLimit(tx *transaction.Transaction) (uint64, error)
- func (ars *ApiResolverStub) ExecuteSCQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)
- func (ars *ApiResolverStub) IsInterfaceNil() bool
- func (ars *ApiResolverStub) StatusMetrics() external.StatusMetricsHandler
- type NodeMock
- func (nm *NodeMock) Address() (string, error)
- func (nm *NodeMock) ConnectToAddresses(addresses []string) error
- func (nm *NodeMock) CreateTransaction(nonce uint64, value string, receiverHex string, senderHex string, ...) (*transaction.Transaction, []byte, error)
- func (nm *NodeMock) GenerateAndSendBulkTransactions(receiverHex string, value *big.Int, noOfTx uint64) error
- func (nm *NodeMock) GenerateAndSendBulkTransactionsOneByOne(receiverHex string, value *big.Int, noOfTx uint64) error
- func (nm *NodeMock) GenerateTransaction(sender string, receiver string, amount string, code string) (*transaction.Transaction, error)
- func (nm *NodeMock) GetAccount(address string) (state.UserAccountHandler, error)
- func (nm *NodeMock) GetBalance(address string) (*big.Int, error)
- func (nm *NodeMock) GetCurrentPublicKey() string
- func (nm *NodeMock) GetHeartbeats() []heartbeat.PubKeyHeartbeat
- func (nm *NodeMock) GetTransaction(hash string) (*transaction.Transaction, error)
- func (nm *NodeMock) IsInterfaceNil() bool
- func (nm *NodeMock) IsRunning() bool
- func (nm *NodeMock) P2PBootstrap() error
- func (nm *NodeMock) SendBulkTransactions(txs []*transaction.Transaction) (uint64, error)
- func (nm *NodeMock) Start() error
- func (nm *NodeMock) StartConsensus() error
- func (nm *NodeMock) ValidateTransaction(tx *transaction.Transaction) error
- func (nm *NodeMock) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse, error)
- type SyncTimerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiResolverStub ¶
type ApiResolverStub struct { ExecuteSCQueryHandler func(query *process.SCQuery) (*vmcommon.VMOutput, error) StatusMetricsHandler func() external.StatusMetricsHandler ComputeTransactionGasLimitHandler func(tx *transaction.Transaction) (uint64, error) }
ApiResolverStub -
func (*ApiResolverStub) ComputeTransactionGasLimit ¶
func (ars *ApiResolverStub) ComputeTransactionGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeTransactionGasLimit -
func (*ApiResolverStub) ExecuteSCQuery ¶
ExecuteSCQuery -
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 NodeMock ¶
type NodeMock struct { AddressHandler func() (string, error) StartHandler func() error StopHandler func() error P2PBootstrapHandler func() error IsRunningHandler func() bool ConnectToAddressesHandler func([]string) error StartConsensusHandler func() 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, receiverHex string, senderHex string, gasPrice uint64, gasLimit uint64, data []byte, signatureHex string) (*transaction.Transaction, []byte, error) ValidateTransactionHandler func(tx *transaction.Transaction) error GetTransactionHandler func(hash string) (*transaction.Transaction, error) SendBulkTransactionsHandler func(txs []*transaction.Transaction) (uint64, error) GetAccountHandler func(address string) (state.UserAccountHandler, error) 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() []heartbeat.PubKeyHeartbeat ValidatorStatisticsApiCalled func() (map[string]*state.ValidatorApiResponse, error) }
NodeMock -
func (*NodeMock) ConnectToAddresses ¶
ConnectToAddresses -
func (*NodeMock) CreateTransaction ¶
func (nm *NodeMock) CreateTransaction(nonce uint64, value string, receiverHex string, senderHex string, gasPrice uint64, gasLimit uint64, data []byte, signatureHex string) (*transaction.Transaction, []byte, error)
CreateTransaction -
func (*NodeMock) GenerateAndSendBulkTransactions ¶
func (nm *NodeMock) GenerateAndSendBulkTransactions(receiverHex string, value *big.Int, noOfTx uint64) error
GenerateAndSendBulkTransactions -
func (*NodeMock) GenerateAndSendBulkTransactionsOneByOne ¶
func (nm *NodeMock) GenerateAndSendBulkTransactionsOneByOne(receiverHex string, value *big.Int, noOfTx uint64) error
GenerateAndSendBulkTransactionsOneByOne -
func (*NodeMock) GenerateTransaction ¶
func (nm *NodeMock) GenerateTransaction(sender string, receiver string, amount string, code string) (*transaction.Transaction, error)
GenerateTransaction -
func (*NodeMock) GetAccount ¶
func (nm *NodeMock) GetAccount(address string) (state.UserAccountHandler, error)
GetAccount -
func (*NodeMock) GetBalance ¶
GetBalance -
func (*NodeMock) GetCurrentPublicKey ¶
GetCurrentPublicKey -
func (*NodeMock) GetHeartbeats ¶
func (nm *NodeMock) GetHeartbeats() []heartbeat.PubKeyHeartbeat
GetHeartbeats -
func (*NodeMock) GetTransaction ¶
func (nm *NodeMock) GetTransaction(hash string) (*transaction.Transaction, error)
GetTransaction -
func (*NodeMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
func (*NodeMock) SendBulkTransactions ¶
func (nm *NodeMock) SendBulkTransactions(txs []*transaction.Transaction) (uint64, error)
SendBulkTransactions -
func (*NodeMock) ValidateTransaction ¶
func (nm *NodeMock) ValidateTransaction(tx *transaction.Transaction) error
ValidateTransaction --
func (*NodeMock) ValidatorStatisticsApi ¶
func (nm *NodeMock) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse, error)
ValidatorStatisticsApi -
type SyncTimerMock ¶
type SyncTimerMock struct { StartSyncCalled 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) StartSync ¶
func (stm *SyncTimerMock) StartSync()
StartSync is a mock implementation for StartSync