lmerkleblock

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: BSD-2-Clause Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matched

type Matched struct {
	N int
	H util.Hash
}

type MerkleBlock

type MerkleBlock struct {
	Header     block.BlockHeader
	Txn        *PartialMerkleTree
	MatchedTxn []Matched
}

func NewMerkleBlock

func NewMerkleBlock(bk *block.Block, txids *set.Set) *MerkleBlock

func (*MerkleBlock) Serialize

func (mb *MerkleBlock) Serialize(w io.Writer) (err error)

func (*MerkleBlock) Unserialize

func (mb *MerkleBlock) Unserialize(r io.Reader) (err error)

type PartialMerkleTree

type PartialMerkleTree struct {
	// contains filtered or unexported fields
}

func NewPartialMerkleTree

func NewPartialMerkleTree(txids []util.Hash, matches []bool) *PartialMerkleTree

func (*PartialMerkleTree) ExtractMatches

func (pmt *PartialMerkleTree) ExtractMatches(matches *[]util.Hash, items *[]int) *util.Hash

func (*PartialMerkleTree) Serialize

func (pmt *PartialMerkleTree) Serialize(w io.Writer) (err error)

func (*PartialMerkleTree) TraverseAndBuild

func (pmt *PartialMerkleTree) TraverseAndBuild(height uint, pos uint, txids []util.Hash, matches []bool)

func (*PartialMerkleTree) TraverseAndExtract

func (pmt *PartialMerkleTree) TraverseAndExtract(height uint, pos uint, bitUsed *int, hashUsed *int,
	matches *[]util.Hash, items *[]int) *util.Hash

func (*PartialMerkleTree) Unserialize

func (pmt *PartialMerkleTree) Unserialize(r io.Reader) (err error)

Jump to

Keyboard shortcuts

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