Documentation ¶
Index ¶
- func AssertEqualErrors(t *testing.T, testName string, expectedError error, actualError error)
- func LoadNativeBlock(file string) (*api.EthereumBlock, error)
- func LoadRawBlock(file string) (*api.Block, error)
- func LoadRosettaBlock(file string) (*rt.BlockResponse, error)
- func LoadRosettaRaw(block *rt.BlockResponse, transactions *rt.BlockTransactionResponse, ...) (*api.Block, error)
- func LoadRosettaTransaction(file string) (*rt.BlockTransactionResponse, error)
- func MakeBlock(height uint64, tag uint32, opts ...Option) *api.Block
- func MakeBlockEvent(eventType api.BlockchainEvent_Type, height uint64, tag uint32, opts ...Option) *model.BlockEvent
- func MakeBlockEventEntries(eventType api.BlockchainEvent_Type, eventTag uint32, endEventId int64, ...) []*model.EventEntry
- func MakeBlockEvents(eventType api.BlockchainEvent_Type, startHeight uint64, endHeight uint64, ...) []*model.BlockEvent
- func MakeBlockMetadata(height uint64, tag uint32, opts ...Option) *api.BlockMetadata
- func MakeBlockMetadatas(size int, tag uint32, opts ...Option) []*api.BlockMetadata
- func MakeBlockMetadatasFromStartHeight(startHeight uint64, size int, tag uint32, opts ...Option) []*api.BlockMetadata
- func MakeBlocksFromStartHeight(startHeight uint64, size int, tag uint32, opts ...Option) []*api.Block
- func MakeBlocksWithTransactionsFromStartHeight(startHeight uint64, size int, tag uint32, transactionSize int, opts ...Option) []*api.Block
- func MakeNativeBlock(height uint64, tag uint32, opts ...Option) *api.NativeBlock
- func MakeRosettaBlock(height uint64, tag uint32, opts ...Option) *api.RosettaBlock
- func MakeTransactionHashList(size int) []string
- func MakeTransactionsFromStartHeight(startHeight int, size int, tag uint32) []*model.Transaction
- func MatchProto(message proto.Message) gomock.Matcher
- func MustTime(value string) time.Time
- func MustTimestamp(value string) *timestamppb.Timestamp
- func NumberOfSolanaVoteTransactions(require *Assertions, rosettaTxs []*rosetta.Transaction) int
- type Assertions
- type Header
- type Option
- type ProtoMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqualErrors ¶
AssertEqualErrors asserts that the errors are equal, by checking if the actual error is caused by the expected error or that they are both nil.
func LoadNativeBlock ¶
func LoadNativeBlock(file string) (*api.EthereumBlock, error)
func LoadRosettaBlock ¶
func LoadRosettaBlock(file string) (*rt.BlockResponse, error)
func LoadRosettaRaw ¶
func LoadRosettaRaw( block *rt.BlockResponse, transactions *rt.BlockTransactionResponse, blockChain common.Blockchain, network common.Network) (*api.Block, error)
func LoadRosettaTransaction ¶
func LoadRosettaTransaction(file string) (*rt.BlockTransactionResponse, error)
func MakeBlockEvent ¶
func MakeBlockEvent(eventType api.BlockchainEvent_Type, height uint64, tag uint32, opts ...Option) *model.BlockEvent
func MakeBlockEventEntries ¶
func MakeBlockEventEntries(eventType api.BlockchainEvent_Type, eventTag uint32, endEventId int64, startHeight uint64, endHeight uint64, tag uint32, opts ...Option) []*model.EventEntry
func MakeBlockEvents ¶
func MakeBlockEvents(eventType api.BlockchainEvent_Type, startHeight uint64, endHeight uint64, tag uint32, opts ...Option) []*model.BlockEvent
func MakeBlockMetadata ¶
func MakeBlockMetadata(height uint64, tag uint32, opts ...Option) *api.BlockMetadata
func MakeBlockMetadatas ¶
func MakeBlockMetadatas(size int, tag uint32, opts ...Option) []*api.BlockMetadata
func MakeNativeBlock ¶
func MakeNativeBlock(height uint64, tag uint32, opts ...Option) *api.NativeBlock
func MakeRosettaBlock ¶
func MakeRosettaBlock(height uint64, tag uint32, opts ...Option) *api.RosettaBlock
func MakeTransactionHashList ¶
func MakeTransactionsFromStartHeight ¶
func MakeTransactionsFromStartHeight(startHeight int, size int, tag uint32) []*model.Transaction
func MustTimestamp ¶
func MustTimestamp(value string) *timestamppb.Timestamp
func NumberOfSolanaVoteTransactions ¶
func NumberOfSolanaVoteTransactions(require *Assertions, rosettaTxs []*rosetta.Transaction) int
Types ¶
type Assertions ¶
type Assertions struct {
*require.Assertions
}
Assertions extends require.Assertions to support comparison of proto messages.
func Require ¶
func Require(t require.TestingT) *Assertions
type Option ¶
type Option func(*builderOptions)
func WithBlockHashFormat ¶
func WithBlockSkipped ¶
func WithBlockSkipped() Option
func WithDataCompression ¶
func WithDataCompression(compression api.Compression) Option
func WithTimestamp ¶
type ProtoMatcher ¶
type ProtoMatcher struct {
// contains filtered or unexported fields
}
func (*ProtoMatcher) Matches ¶
func (m *ProtoMatcher) Matches(x any) bool
Matches implements gomock.Matcher.
func (*ProtoMatcher) String ¶
func (m *ProtoMatcher) String() string
String implements gomock.Matcher.
Click to show internal directories.
Click to hide internal directories.