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

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