node

package
v0.0.0-...-ee16f00 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const AccountNumber = 100000

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Tansactions []string
	Timestamp   time.Time
}

type Node

type Node struct {
	Tetris *tetris.Tetris

	Report chan bool

	States     map[uint]*State
	Blockchain []Block
	// contains filtered or unexported fields
}

func NewNode

func NewNode(id, number uint, signMsg bool) (*Node, error)

func (*Node) BroadcastTransactions

func (n *Node) BroadcastTransactions(rps uint, num uint)

func (*Node) Running

func (n *Node) Running() bool

func (*Node) Start

func (n *Node) Start(wg *sync.WaitGroup) error

func (*Node) Stop

func (n *Node) Stop() error

type State

type State struct {
	Nonce      uint64
	Balance    uint64
	PendingTxs []string
}

Jump to

Keyboard shortcuts

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