node

package
v0.0.0-...-5fb01ef Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkhNode

type AkhNode struct {
	Host p2p.AkhHost

	Genesis *Block
	Head    *Block

	sync.Mutex
	// contains filtered or unexported fields
}

func NewAkhNode

func NewAkhNode(port int, privateKey []byte) (node *AkhNode)

func (*AkhNode) Announce

func (node *AkhNode) Announce(block *Block) (err error)

func (*AkhNode) GetPrivate

func (node *AkhNode) GetPrivate() crypto.PrivKey

func (*AkhNode) Pay

func (node *AkhNode) Pay(peerIdStr string, amount uint64) error

func (*AkhNode) Produce

func (node *AkhNode) Produce() (block *Block, err error)

func (*AkhNode) Receive

func (node *AkhNode) Receive(bd BlockData, peerId peer.ID)

TODO think of reaction to invalid block TODO retransmit valid block

func (*AkhNode) ReceiveTransaction

func (node *AkhNode) ReceiveTransaction(t Transaction)

func (*AkhNode) ReceiveVote

func (node *AkhNode) ReceiveVote(v Vote)

func (*AkhNode) Vote

func (node *AkhNode) Vote(peerIdStr string) error

Jump to

Keyboard shortcuts

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