server

package
v0.0.0-...-add7044 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockchain

func NewBlockchain(dbPath string, index uint64) error

NewBlockchain creates a database db

func SaveBlock

func SaveBlock(block *protoBlockchain.Block) error

SaveBlock saves a block in the chain

func StartServer

func StartServer(port string)

StartServer start server

Types

type Blockchain

type Blockchain struct {
	BlockDb      *leveldb.DB
	CurrentBlock uint64
}

func (*Blockchain) GetBlock

func (bc *Blockchain) GetBlock(index uint64) ([]byte, error)

GetBlock returns the array of blocks at an index

type ConnectionStore

type ConnectionStore struct {
	// contains filtered or unexported fields
}

ConnectionStore handles peer messaging

Jump to

Keyboard shortcuts

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