test

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ObjectTableName = "objects"
View Source
const ObjectsNumberOfShards = 64
View Source
const PrefixTreeTableName = "slash_prefix_tree_nodes"
View Source
const PrefixesNumberOfShards = 64

Variables

View Source
var (
	StatusRes          string
	MockBLockRes       []string
	MockBLockResultRes []string
)
View Source
var LatestHeight int

Functions

func Block

func Block(height int64) []byte

func BlockResult

func BlockResult(height int64) []byte

func GetObjectsShardNumberByBucketName

func GetObjectsShardNumberByBucketName(bucketName string) uint32

func GetObjectsTableName

func GetObjectsTableName(bucketName string) string

func GetObjectsTableNameByShardNumber

func GetObjectsTableNameByShardNumber(shard int) string

func GetPrefixesShardNumberByBucketName added in v1.2.0

func GetPrefixesShardNumberByBucketName(bucketName string) uint32

func GetPrefixesTableName added in v1.2.0

func GetPrefixesTableName(bucketName string) string

func GetPrefixesTableNameByShardNumber added in v1.2.0

func GetPrefixesTableNameByShardNumber(shard int) string

func GetStatus

func GetStatus() []byte

func MockChainRPCServer

func MockChainRPCServer()

func Verify

func Verify(t *testing.T) error

Types

type ChainCase

type ChainCase struct {
	Name         string `json:"name"`
	Block        string `json:"block"`
	BlockResults string `json:"block_results"`
}

type RPCRequest

type RPCRequest struct {
	JSONRPC string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Id      int             `json:"id"`
	Params  json.RawMessage `json:"params"` // must be map[string]interface{} or []interface{}
}

type RPCResponse

type RPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	Id      int             `json:"id"`
	Result  json.RawMessage `json:"result"` // must be map[string]interface{} or []interface{}
}

Jump to

Keyboard shortcuts

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