blockchaindb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockChainDB

type BlockChainDB interface {
	Close()
	AddBlock(block *domain.Block) error
	AddUnconfirmedBlock(block *domain.Block) error
	GetBlockByNumber(blockNumber uint64) (*domain.Block, error)
	GetBlockByHash(hash string) (*domain.Block, error)
	GetLastBlock() (*domain.Block, error)
	GetTransactionByTxID(txid string) (*domain.Transaction, error)
	GetBlockByTxID(txid string) (*domain.Block, error)
}

func CreateNewBlockchainDB

func CreateNewBlockchainDB(dbPath string) BlockChainDB

type BlockchainDBImpl

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

func (*BlockchainDBImpl) AddBlock

func (b *BlockchainDBImpl) AddBlock(block *domain.Block) error

func (*BlockchainDBImpl) AddUnconfirmedBlock

func (b *BlockchainDBImpl) AddUnconfirmedBlock(block *domain.Block) error

func (*BlockchainDBImpl) Close

func (b *BlockchainDBImpl) Close()

func (*BlockchainDBImpl) GetBlockByHash

func (b *BlockchainDBImpl) GetBlockByHash(hash string) (*domain.Block, error)

func (*BlockchainDBImpl) GetBlockByNumber

func (b *BlockchainDBImpl) GetBlockByNumber(blockNumber uint64) (*domain.Block, error)

func (*BlockchainDBImpl) GetBlockByTxID

func (b *BlockchainDBImpl) GetBlockByTxID(txid string) (*domain.Block, error)

func (*BlockchainDBImpl) GetLastBlock

func (b *BlockchainDBImpl) GetLastBlock() (*domain.Block, error)

func (*BlockchainDBImpl) GetTransactionByTxID

func (b *BlockchainDBImpl) GetTransactionByTxID(txid string) (*domain.Transaction, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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