utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBlockTx

func DecodeBlockTx(data []byte, typeFilter transactions.TxType) (transactions.Transaction, uint32, error)

func EncodeBlockTx

func EncodeBlockTx(tx transactions.Transaction, txIndex uint32) ([]byte, error)

encodeBlockTx tries to serialize type, index and encoded value of transactions.Transaction

func ReadUint32

func ReadUint32(r io.Reader, v *uint32) error

ReadUint32 will read four bytes and convert them to a uint32 from the Tx byteOrder. The result is put into v.

func WriteUint32

func WriteUint32(w io.Writer, value uint32) error

writeUint32 Tx utility to use a Tx byteOrder on internal encoding

func WriteUint64

func WriteUint64(w io.Writer, value uint64) error

writeUint64 Tx utility to use a common byteOrder on internal encoding

Types

This section is empty.

Jump to

Keyboard shortcuts

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