BitCoSi

package
v0.0.0-...-4969170 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	LeaderId   net.IP
	PublicKey  string
	MerkleRoot string
	Parent     string
}

func NewHeader

func NewHeader(transactions TransactionList, parent string, IP net.IP, key string) (hd Header)

type Parser

type Parser struct {
	Path      string
	Magic     [4]byte
	CurrentId uint32
}

func NewParser

func NewParser(path string, magic [4]byte) (parser *Parser, err error)

func (*Parser) Parse

func (p *Parser) Parse(first_block, last_block int) []blkparser.Tx

type TrBlock

type TrBlock struct {
	Magic      [4]byte
	BlockSize  uint32
	HeaderHash string
	Header
	TransactionList
}

func NewTrBlock

func NewTrBlock(transactions TransactionList, header Header) (tr TrBlock)

func (*TrBlock) Print

func (trb *TrBlock) Print()

type TransactionList

type TransactionList struct {
	Txs   []blkparser.Tx `json:"tx,omitempty"`
	TxCnt uint32         `json:"n_tx"`
	Fees  float64        `json:"-"`
}

func NewTransactionList

func NewTransactionList(transactions []blkparser.Tx, n int) (tr TransactionList)

func (*TransactionList) Print

func (tran *TransactionList) Print()

Jump to

Keyboard shortcuts

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