datatypes

package
v0.0.0-...-9cf374a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Index        int           `json:"index" `
	Hash         string        `json:"hash"`
	Timestamp    time.Time     `json:"created_at"`
	PrevHash     string        `json:"previous_hash"`
	Nounce       int64         `json:"nounce"`
	Transactions []Transaction `json:"transactions"`
}

func (*Block) SetHash

func (b *Block) SetHash() string

type BlockChain

type BlockChain struct {
	sync.RWMutex
	BlkChain []Block
}

type CurrentTransactions

type CurrentTransactions struct {
	sync.RWMutex
	Transactions []Transaction
}

type Transaction

type Transaction struct {
	Sender    string `json:"sender"`
	Receiver  string `json:"receiver"`
	Signature string `json:"signature"`
	Amount    int64  `json:"amount"`
}

Jump to

Keyboard shortcuts

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