foundationdb

package
v0.0.0-...-a0055f1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransactionIndex

func CreateTransactionIndex(counter uint64) []byte

func GetLastWrittenBlock

func GetLastWrittenBlock(db *fdb.Database) (uint32, error)

func GetLastWrittenTransactionAndBlock

func GetLastWrittenTransactionAndBlock(db *fdb.Database) (uint32, uint32, error)

func GetMaxTransactionCounter

func GetMaxTransactionCounter(db *fdb.Database) (uint64, error)

func ReadTransact

func ReadTransact(tx func(tr fdb.ReadTransaction) (interface{}, error)) (interface{}, error)

func Reinit

func Reinit(numProc int)

func Transact

func Transact(tx func(tr fdb.Transaction) (interface{}, error)) (interface{}, error)

Types

type BlockAssembler

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

func NewBlockAssembler

func NewBlockAssembler(db *fdb.Database, redisClient *redis.Client) *BlockAssembler

func (*BlockAssembler) AssembleBlock

func (r *BlockAssembler) AssembleBlock(newBlockNumber uint32, previousHash []byte, startNext bool) (*block.Block, error)

func (*BlockAssembler) GetRecordsForBlock

func (r *BlockAssembler) GetRecordsForBlock(blockNumber uint32) ([]*transaction.SpendingRecord, error)

type BlockWriter

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

func NewBlockWriter

func NewBlockWriter(db *fdb.Database) *BlockWriter

func (*BlockWriter) WriteBlock

func (r *BlockWriter) WriteBlock(block block.Block) error

type FDBWorker

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

func NewFDBWorker

func NewFDBWorker() *FDBWorker

type FDBWorkerPool

type FDBWorkerPool struct {
	Concurrency int
	// contains filtered or unexported fields
}
var WorkerPool FDBWorkerPool

type FundingTXcreator

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

func NewFundingTXcreator

func NewFundingTXcreator(db *fdb.Database, signingKey []byte) *FundingTXcreator

func (*FundingTXcreator) CreateFundingTX

func (r *FundingTXcreator) CreateFundingTX(to common.Address,
	value *types.BigInt,
	counter uint64,
	depositIndex *types.BigInt) error

type TestUTXOcreator

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

func NewTestUTXOcreator

func NewTestUTXOcreator(db *fdb.Database) *TestUTXOcreator

func (*TestUTXOcreator) InsertUTXO

func (r *TestUTXOcreator) InsertUTXO(address common.Address, blockNumber uint32, transactionNumber uint32, outputNumber uint8, value *types.BigInt) error

type UTXOReader

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

func NewUTXOReader

func NewUTXOReader(db *fdb.Database) *UTXOReader

func (*UTXOReader) CheckIfUTXOsExist

func (r *UTXOReader) CheckIfUTXOsExist(tx *transaction.SignedTransaction) error

type UTXOWriter

type UTXOWriter struct {
	Concurrency int
	// contains filtered or unexported fields
}

func NewUTXOWriter

func NewUTXOWriter(db *fdb.Database, concurrency int) *UTXOWriter

func (*UTXOWriter) WriteSpending

func (r *UTXOWriter) WriteSpending(res *transaction.ParsedTransactionResult, counter uint64) error

type UTXOinserter

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

func NewUTXOinserter

func NewUTXOinserter(db *fdb.Database) *UTXOinserter

func (*UTXOinserter) InsertUTXO

func (r *UTXOinserter) InsertUTXO(tx *transaction.SignedTransaction, blockNumber uint32, transactionNumber uint32) error

type UTXOlister

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

func NewUTXOlister

func NewUTXOlister(db *fdb.Database) *UTXOlister

func (*UTXOlister) GetUTXOsForAddress

func (r *UTXOlister) GetUTXOsForAddress(address common.Address, afterBlock uint32, afterTransaction uint32, afterOutput uint8, limit int) ([][transaction.UTXOIndexLength]byte, error)

type WithdrawTXMarker

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

func NewWithdrawTXMarker

func NewWithdrawTXMarker(db *fdb.Database) *WithdrawTXMarker

func (*WithdrawTXMarker) MarkTX

func (r *WithdrawTXMarker) MarkTX(to common.Address,
	index *types.BigInt) (bool, error)

Jump to

Keyboard shortcuts

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