jetdrop

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jetdrop represents Jet Drops (Blocks) of a blockchain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJetDrop

func EncodeJetDrop(drop *JetDrop) ([]byte, error)

EncodeJetDrop serializes jet drop

Types

type JetDrop

type JetDrop struct {
	PrevHash     []byte
	RecordHashes [][]byte // TODO: this should be a byte slice that represents the merkle tree root of records
}

JetDrop is a blockchain block. It contains hashes from all records from slot.

func DecodeJetDrop

func DecodeJetDrop(buf []byte) (*JetDrop, error)

DecodeJetDrop deserializes jet drop

func (*JetDrop) Hash

func (jd *JetDrop) Hash() ([]byte, error)

Hash calculates jet drop hash. Raw data for hash should contain previous hash and merkle tree hash from records.

Jump to

Keyboard shortcuts

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