block

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package block provides getters for Neo Block structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTransaction

func GetTransaction(b Block, index int) transaction.Transaction

GetTransaction returns transaction from the given block by its index. It uses `Neo.Block.GetTransaction` syscall internally.

func GetTransactionCount

func GetTransactionCount(b Block) int

GetTransactionCount returns the number of recorded transactions in the given block. It uses `Neo.Block.GetTransactionCount` syscall internally.

func GetTransactions

func GetTransactions(b Block) []transaction.Transaction

GetTransactions returns a slice of transactions recorded in the given block. It uses `Neo.Block.GetTransactions` syscall internally.

Types

type Block

type Block struct{}

Block represents a NEO block, it's an opaque data structure that you can get data from only using functions from this package. It's similar in function to the Block class in the Neo .net framework. To use it you need to get it via blockchain.GetBlock function call.

Jump to

Keyboard shortcuts

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