dummy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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