block

package
v1.1.26-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(routes *wrapper.RouterWrapper)

Routes defines block related routes

Types

type APIBlock added in v1.0.147

type APIBlock struct {
	Nonce           uint64               `json:"nonce"`
	Round           uint64               `json:"round"`
	Hash            string               `json:"hash"`
	PrevBlockHash   string               `json:"prevBlockHash"`
	Epoch           uint32               `json:"epoch"`
	Shard           uint32               `json:"shard"`
	NumTxs          uint32               `json:"numTxs"`
	NotarizedBlocks []*APINotarizedBlock `json:"notarizedBlocks,omitempty"`
	MiniBlocks      []*APIMiniBlock      `json:"miniBlocks,omitempty"`
}

APIBlock represents the structure for block that is returned by api routes

type APIMiniBlock added in v1.0.147

type APIMiniBlock struct {
	Hash             string                              `json:"hash"`
	Type             string                              `json:"type"`
	SourceShard      uint32                              `json:"sourceShard"`
	DestinationShard uint32                              `json:"destinationShard"`
	Transactions     []*transaction.ApiTransactionResult `json:"transactions,omitempty"`
}

APIMiniBlock represents the structure for a miniblock

type APINotarizedBlock added in v1.1.1

type APINotarizedBlock struct {
	Hash  string `json:"hash"`
	Nonce uint64 `json:"nonce"`
	Shard uint32 `json:"shard"`
}

APINotarizedBlock represents a notarized block

type BlockService added in v1.0.147

type BlockService interface {
	GetBlockByHash(hash string, withTxs bool) (*APIBlock, error)
	GetBlockByNonce(nonce uint64, withTxs bool) (*APIBlock, error)
}

BlockService interface defines methods that can be used from `elrondFacade` context variable

Jump to

Keyboard shortcuts

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