types

package
v0.0.0-...-cf6e08f Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Timestamp     int64
	Transactions  []Transaction
	PrevBlockHash []byte
	Hash          []byte
	Nonce         int
	Height        int
}

func (Block) HashTransactions

func (b Block) HashTransactions() []byte

func (Block) Serialize

func (b Block) Serialize() []byte

type Transaction

type Transaction struct {
	Hash      []byte
	VIn       []tx_io.TXInput
	VOut      []tx_io.TXOutput
	Timestamp int64
	Fee       float64
}

func (*Transaction) CalcHash

func (tx *Transaction) CalcHash() []byte

func (*Transaction) CalculateFee

func (tx *Transaction) CalculateFee(feePerByte float64) float64

func (Transaction) IsCoinBase

func (tx Transaction) IsCoinBase() bool

func (Transaction) Serialize

func (tx Transaction) Serialize() []byte

func (*Transaction) Sign

func (tx *Transaction) Sign(privateKey []byte, prevTXs map[string]Transaction) Transaction

func (*Transaction) TrimmedCopy

func (tx *Transaction) TrimmedCopy() Transaction

func (*Transaction) Verify

func (tx *Transaction) Verify(prevTXs map[string]Transaction) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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