mock

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverStub

type DriverStub struct {
	SaveBlockCalled             func(args *outportcore.ArgsSaveBlockData) error
	RevertBlockCalled           func(header data.HeaderHandler, body data.BodyHandler) error
	SaveRoundsInfoCalled        func(roundsInfos []*outportcore.RoundInfo) error
	SaveValidatorsPubKeysCalled func(validatorsPubKeys map[uint32][][]byte, epoch uint32) error
	SaveValidatorsRatingCalled  func(indexID string, infoRating []*outportcore.ValidatorRatingInfo) error
	SaveAccountsCalled          func(timestamp uint64, acc map[string]*outportcore.AlteredAccount) error
	FinalizedBlockCalled        func(headerHash []byte) error
	CloseCalled                 func() error
}

DriverStub -

func (*DriverStub) Close

func (d *DriverStub) Close() error

Close -

func (*DriverStub) FinalizedBlock added in v1.2.24

func (d *DriverStub) FinalizedBlock(headerHash []byte) error

FinalizedBlock -

func (*DriverStub) IsInterfaceNil

func (d *DriverStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*DriverStub) RevertIndexedBlock

func (d *DriverStub) RevertIndexedBlock(header data.HeaderHandler, body data.BodyHandler) error

RevertIndexedBlock -

func (*DriverStub) SaveAccounts

func (d *DriverStub) SaveAccounts(timestamp uint64, acc map[string]*outportcore.AlteredAccount, _ uint32) error

SaveAccounts -

func (*DriverStub) SaveBlock

func (d *DriverStub) SaveBlock(args *outportcore.ArgsSaveBlockData) error

SaveBlock -

func (*DriverStub) SaveRoundsInfo

func (d *DriverStub) SaveRoundsInfo(roundsInfos []*outportcore.RoundInfo) error

SaveRoundsInfo -

func (*DriverStub) SaveValidatorsPubKeys

func (d *DriverStub) SaveValidatorsPubKeys(validatorsPubKeys map[uint32][][]byte, epoch uint32) error

SaveValidatorsPubKeys -

func (*DriverStub) SaveValidatorsRating

func (d *DriverStub) SaveValidatorsRating(indexID string, infoRating []*outportcore.ValidatorRatingInfo) error

SaveValidatorsRating -

type EconomicsHandlerMock added in v1.4.0

type EconomicsHandlerMock struct {
}

EconomicsHandlerMock -

func (*EconomicsHandlerMock) ComputeGasLimit added in v1.4.0

ComputeGasLimit -

func (*EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValue added in v1.4.0

func (e *EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValue(tx coreData.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*EconomicsHandlerMock) ComputeTxFee added in v1.4.0

func (*EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsed added in v1.4.0

func (e *EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsed(tx coreData.TransactionWithFeeHandler, gasUsed uint64) *big.Int

ComputeTxFeeBasedOnGasUsed -

func (*EconomicsHandlerMock) IsInterfaceNil added in v1.4.0

func (e *EconomicsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsHandlerMock) MaxGasLimitPerBlock added in v1.4.0

func (e *EconomicsHandlerMock) MaxGasLimitPerBlock(_ uint32) uint64

MaxGasLimitPerBlock -

func (*EconomicsHandlerMock) MinGasLimit added in v1.4.0

func (e *EconomicsHandlerMock) MinGasLimit() uint64

MinGasLimit -

type HTTPClientStub added in v1.3.29

type HTTPClientStub struct {
	PostCalled func(route string, payload interface{}) error
}

HTTPClientStub -

func (*HTTPClientStub) IsInterfaceNil added in v1.3.29

func (stub *HTTPClientStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HTTPClientStub) Post added in v1.3.29

func (stub *HTTPClientStub) Post(route string, payload interface{}) error

Post -

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL