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 NodeStub
- func (ns *NodeStub) CreateTransaction(nonce uint64, value string, receiverHex string, senderHex string, ...) (*transaction.Transaction, []byte, error)
- func (ns *NodeStub) DecodeAddressPubkey(pk string) ([]byte, error)
- func (ns *NodeStub) DirectTrigger(epoch uint32) error
- func (ns *NodeStub) EncodeAddressPubkey(pk []byte) (string, error)
- func (ns *NodeStub) GetAccount(address string) (state.UserAccountHandler, error)
- func (ns *NodeStub) GetBalance(address string) (*big.Int, error)
- func (ns *NodeStub) GetHeartbeats() []data.PubKeyHeartbeat
- func (ns *NodeStub) GetPeerInfo(pid string) ([]core.QueryP2PPeerInfo, error)
- func (ns *NodeStub) GetQueryHandler(name string) (debug.QueryHandler, error)
- func (ns *NodeStub) GetTransaction(hash string) (*transaction.ApiTransactionResult, 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) StartConsensus() error
- func (ns *NodeStub) ValidateTransaction(tx *transaction.Transaction) error
- func (ns *NodeStub) 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 NodeStub ¶ added in v1.0.102
type NodeStub struct { AddressHandler func() (string, error) 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 string, signatureHex string, chainID string, version uint32) (*transaction.Transaction, []byte, error) ValidateTransactionHandler func(tx *transaction.Transaction) error GetTransactionHandler func(hash string) (*transaction.ApiTransactionResult, 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() []data.PubKeyHeartbeat ValidatorStatisticsApiCalled func() (map[string]*state.ValidatorApiResponse, error) DirectTriggerCalled func(epoch uint32) 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) }
NodeStub -
func (*NodeStub) CreateTransaction ¶ added in v1.0.102
func (ns *NodeStub) CreateTransaction(nonce uint64, value string, receiverHex string, senderHex string, gasPrice uint64, gasLimit uint64, data string, signatureHex string, chainID string, version 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) GetBalance ¶ added in v1.0.102
GetBalance -
func (*NodeStub) GetHeartbeats ¶ added in v1.0.102
func (ns *NodeStub) GetHeartbeats() []data.PubKeyHeartbeat
GetHeartbeats -
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) (*transaction.ApiTransactionResult, error)
GetTransaction -
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) StartConsensus ¶ added in v1.0.102
StartConsensus -
func (*NodeStub) ValidateTransaction ¶ added in v1.0.102
func (ns *NodeStub) ValidateTransaction(tx *transaction.Transaction) error
ValidateTransaction --
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