blocks

package
v0.0.0-...-4859cea Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslatePacket

func TranslatePacket(pk packet.Packet, store1, store2 *Store)

TranslatePacket translates the block runtime ids for the packet.

Types

type Store

type Store struct {
	I int64
	// contains filtered or unexported fields
}

Store is a block store, used for translating the block state ids.

func (*Store) HashFromRuntime

func (store *Store) HashFromRuntime(runtime int64) int64

HashFromRuntime converts a runtime id to a block hash.

func (*Store) Import

func (store *Store) Import(blocks []interface{})

Import imports an array of blocks into the block store.

func (*Store) RuntimeFromHash

func (store *Store) RuntimeFromHash(hash int64) int64

RuntimeFromHash converts a block hash to a block runtime id.

Jump to

Keyboard shortcuts

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