dummy

package
v0.0.0-...-ba34047 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicDATest

func BasicDATest(t *testing.T, da da.DA)

BasicDATest tests round trip of messages to DA and back.

func CheckErrors

func CheckErrors(t *testing.T, da da.DA)

CheckErrors ensures that errors are handled properly by DA.

func ConcurrentReadWriteTest

func ConcurrentReadWriteTest(t *testing.T, da da.DA)

ConcurrentReadWriteTest tests the use of mutex lock in DummyDA by calling separate methods that use `d.data` and making sure there's no race conditions.

func GetIDsTest

func GetIDsTest(t *testing.T, da da.DA)

GetIDsTest tests iteration over DA

func RunDATestSuite

func RunDATestSuite(t *testing.T, d da.DA)

RunDATestSuite runs all tests against given DA

func StartMockServer

func StartMockServer()

StartMockServer starts a mock server for testing purpose

Types

type Blob

type Blob = da.Blob

Blob is a type alias

type BlocksResponse

type BlocksResponse struct {
	BlockNumber      uint32             `json:"block_number"`
	DataTransactions []DataTransactions `json:"data_transactions"`
}

BlocksResponse represents the structure of a response containing blocks information.

type DataTransactions

type DataTransactions struct {
	Data      string `json:"data"`
	Extrinsic string `json:"extrinsic"`
}

DataTransactions represents data transactions within the block.

type ID

type ID = da.ID

ID is a type alias

type SubmitRequest

type SubmitRequest struct {
	Data string `json:"data"`
}

SubmitRequest represents a request to submit data.

type SubmitResponse

type SubmitResponse struct {
	BlockNumber      uint32 `json:"block_number"`
	BlockHash        string `json:"block_hash"`
	TransactionHash  string `json:"hash"`
	TransactionIndex uint32 `json:"index"`
}

SubmitResponse represents the response after submitting data.

Jump to

Keyboard shortcuts

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