chainstorage

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestBlockNeiExistance_Helper

func TestBlockNeiExistance_Helper(bc chainreadinterface.IBlockChain, neiName string, neiExpectedExistance bool, t *testing.T)

func TestCopyOfJsonRealChain_Helper

func TestCopyOfJsonRealChain_Helper(bc chainreadinterface.IBlockChain, t *testing.T)

func TestCopyOfTinyChain_Helper

func TestCopyOfTinyChain_Helper(bc chainreadinterface.IBlockChain, t *testing.T)

func TestTransactionNeiExistance_Helper

func TestTransactionNeiExistance_Helper(bc chainreadinterface.IBlockChain, neiName string, neiExpectedExistance bool, t *testing.T)

Types

type Address

type Address struct {
	AddressHandle
	// contains filtered or unexported fields
}

Address implements IAddress

func (*Address) NthTxo

func (adr *Address) NthTxo(n int64) (chainreadinterface.ITxoHandle, error)

func (*Address) TxoCount

func (adr *Address) TxoCount() (int64, error)

type AddressHandle

type AddressHandle struct {
	HashHeight
}

AddressHandle implements IAddressHandle

func (*AddressHandle) Hash

func (ah *AddressHandle) Hash() indexedhashes.Sha256

func (*AddressHandle) HashSpecified

func (ah *AddressHandle) HashSpecified() bool

func (*AddressHandle) Height

func (ah *AddressHandle) Height() int64

func (*AddressHandle) HeightSpecified

func (ah *AddressHandle) HeightSpecified() bool

type Block

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

func (*Block) Hash

func (block *Block) Hash() (indexedhashes.Sha256, error)

func (*Block) HashSpecified

func (block *Block) HashSpecified() bool

func (*Block) Height

func (block *Block) Height() int64

func (*Block) HeightSpecified

func (block *Block) HeightSpecified() bool

func (*Block) IsBlockHandle

func (block *Block) IsBlockHandle()

func (*Block) IsInvalid

func (block *Block) IsInvalid() bool

func (*Block) NonEssentialInts

func (block *Block) NonEssentialInts() (*map[string]int64, error)

func (*Block) NthTransaction

func (block *Block) NthTransaction(n int64) (chainreadinterface.ITransHandle, error)

func (*Block) TransactionCount

func (block *Block) TransactionCount() (int64, error)

type BlockHandle

type BlockHandle struct {
	HashHeight
	// contains filtered or unexported fields
}

BlockHandle in package chainstorage implements IBlockHandle

func (*BlockHandle) Hash

func (bh *BlockHandle) Hash() (indexedhashes.Sha256, error)

func (*BlockHandle) HashSpecified

func (bh *BlockHandle) HashSpecified() bool

func (*BlockHandle) Height

func (bh *BlockHandle) Height() int64

func (*BlockHandle) HeightSpecified

func (bh *BlockHandle) HeightSpecified() bool

func (*BlockHandle) IsBlockHandle

func (bh *BlockHandle) IsBlockHandle()

func (*BlockHandle) IsInvalid

func (bh *BlockHandle) IsInvalid() bool

type ConcreteAppendableChainCreator

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

func NewConcreteAppendableChainCreator

func NewConcreteAppendableChainCreator(
	folder string, blkNeiNames []string, trnNeiNames []string,
	transactionIndexingToBeDelegated bool) (*ConcreteAppendableChainCreator, error)

func (*ConcreteAppendableChainCreator) Create

func (cacc *ConcreteAppendableChainCreator) Create() error

func (*ConcreteAppendableChainCreator) Exists

func (cacc *ConcreteAppendableChainCreator) Exists() bool

func (*ConcreteAppendableChainCreator) Open

func (*ConcreteAppendableChainCreator) OpenWithIndexer

type HashHeight

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

HashHeight in package chainstorage

type IAppendableChain

type IAppendableChain interface {
	AppendBlock(chainreadinterface.IBlockChain, chainreadinterface.IBlockHandle) error
	Close()
	GetAsChainReadInterface() chainreadinterface.IBlockChain
	Sync() error
}

type IAppendableChainFactory

type IAppendableChainFactory interface {
	Exists() bool
	Create() error
	Open() (IAppendableChain, error)
	OpenReadOnly() (chainreadinterface.IBlockChain, chainreadinterface.IHandleCreator, IParents, IPrivilegedFiles, error)
}

type IAppendableChainFactoryWithIndexer

type IAppendableChainFactoryWithIndexer interface {
	IAppendableChainFactory
	OpenWithIndexer() (IAppendableChain, transactionindexing.ITransactionIndexer, error)
}

type IParents added in v0.0.2

type IParents interface {
	ParentBlockOfTrans(transactionHeight int64) (int64, error)
	ParentTransOfTxi(transactionHeight int64) (int64, error)
	ParentTransOfTxo(transactionHeight int64) (int64, error)
}

type IPrivilegedFiles added in v0.0.7

type IPrivilegedFiles interface {
	TxoSatsFile() wordfile.ReadAtWordCounter
	TxiTxFile() wordfile.ReadAtWordCounter
	TxiVoutFile() wordfile.ReadAtWordCounter
	TransFirstTxiFile() wordfile.ReadAtWordCounter
	TransFirstTxoFile() wordfile.ReadAtWordCounter
}

IPrivilegedFiles give access to certain files by a privileged program (pudding-server)

type TransHandle

type TransHandle struct {
	HashHeight
	// contains filtered or unexported fields
}

TransHandle in package chainstorage implements ITransHandle

func (*TransHandle) Hash

func (th *TransHandle) Hash() (indexedhashes.Sha256, error)

func (*TransHandle) HashSpecified

func (th *TransHandle) HashSpecified() bool

func (*TransHandle) Height

func (th *TransHandle) Height() int64

func (*TransHandle) HeightSpecified

func (th *TransHandle) HeightSpecified() bool

func (*TransHandle) IndicesPath

func (th *TransHandle) IndicesPath() (int64, int64)

func (*TransHandle) IndicesPathSpecified

func (th *TransHandle) IndicesPathSpecified() bool

func (*TransHandle) IsInvalid

func (th *TransHandle) IsInvalid() bool

func (*TransHandle) IsTransHandle

func (th *TransHandle) IsTransHandle()

type TransIndex

type TransIndex struct {
	TransHandle
	// contains filtered or unexported fields
}

TransIndex in package chainstorage

type Transaction

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

Transaction implements ITransaction

func (*Transaction) Hash

func (tr *Transaction) Hash() (indexedhashes.Sha256, error)

func (*Transaction) HashSpecified

func (tr *Transaction) HashSpecified() bool

func (*Transaction) Height

func (tr *Transaction) Height() int64

func (*Transaction) HeightSpecified

func (tr *Transaction) HeightSpecified() bool

func (*Transaction) IndicesPath

func (th *Transaction) IndicesPath() (int64, int64)

func (*Transaction) IndicesPathSpecified

func (th *Transaction) IndicesPathSpecified() bool

func (*Transaction) IsInvalid

func (tr *Transaction) IsInvalid() bool

func (*Transaction) IsTransHandle

func (tr *Transaction) IsTransHandle()

func (*Transaction) NonEssentialInts

func (tr *Transaction) NonEssentialInts() (*map[string]int64, error)

func (*Transaction) NthTxi

func (*Transaction) NthTxo

func (*Transaction) TxiCount

func (tr *Transaction) TxiCount() (int64, error)

func (*Transaction) TxoCount

func (tr *Transaction) TxoCount() (int64, error)

type Txi

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

Txi implements ITxi

func (*Txi) IndicesPath

func (txi *Txi) IndicesPath() (int64, int64, int64)

func (*Txi) IndicesPathSpecified

func (txi *Txi) IndicesPathSpecified() bool

func (*Txi) ParentIndex

func (txi *Txi) ParentIndex() int64

func (*Txi) ParentSpecified

func (txi *Txi) ParentSpecified() bool

func (*Txi) ParentTrans

func (txi *Txi) ParentTrans() chainreadinterface.ITransHandle

func (*Txi) SourceTxo

func (txi *Txi) SourceTxo() (chainreadinterface.ITxoHandle, error)

func (*Txi) TxiHeight

func (txi *Txi) TxiHeight() int64

func (*Txi) TxiHeightSpecified

func (txi *Txi) TxiHeightSpecified() bool

type TxiHandle

type TxiHandle struct {
	TxxHandle
}

TxiHandle in package chainstorage implements ITxiHandle

func (*TxiHandle) IndicesPath

func (txi *TxiHandle) IndicesPath() (int64, int64, int64)

func (*TxiHandle) IndicesPathSpecified

func (txi *TxiHandle) IndicesPathSpecified() bool

func (*TxiHandle) ParentIndex

func (txi *TxiHandle) ParentIndex() int64

func (*TxiHandle) ParentSpecified

func (txi *TxiHandle) ParentSpecified() bool

func (*TxiHandle) ParentTrans

func (txi *TxiHandle) ParentTrans() chainreadinterface.ITransHandle

func (*TxiHandle) TxiHeight

func (txi *TxiHandle) TxiHeight() int64

func (*TxiHandle) TxiHeightSpecified

func (txi *TxiHandle) TxiHeightSpecified() bool

type Txo

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

Txo implements ITxo

func (*Txo) Address

func (txo *Txo) Address() (chainreadinterface.IAddressHandle, error)

func (*Txo) IndicesPath

func (txo *Txo) IndicesPath() (int64, int64, int64)

func (*Txo) IndicesPathSpecified

func (txo *Txo) IndicesPathSpecified() bool

func (*Txo) ParentIndex

func (txo *Txo) ParentIndex() int64

func (*Txo) ParentSpecified

func (txo *Txo) ParentSpecified() bool

func (*Txo) ParentTrans

func (txo *Txo) ParentTrans() chainreadinterface.ITransHandle

func (*Txo) Satoshis

func (txo *Txo) Satoshis() (int64, error)

func (*Txo) TxoHeight

func (txo *Txo) TxoHeight() int64

func (*Txo) TxoHeightSpecified

func (txo *Txo) TxoHeightSpecified() bool

type TxoHandle

type TxoHandle struct {
	TxxHandle
}

TxoHandle implements ITxoHandle

func (*TxoHandle) IndicesPath

func (txo *TxoHandle) IndicesPath() (int64, int64, int64)

func (*TxoHandle) IndicesPathSpecified

func (txo *TxoHandle) IndicesPathSpecified() bool

func (*TxoHandle) ParentIndex

func (txo *TxoHandle) ParentIndex() int64

func (*TxoHandle) ParentSpecified

func (txo *TxoHandle) ParentSpecified() bool

func (*TxoHandle) ParentTrans

func (txo *TxoHandle) ParentTrans() chainreadinterface.ITransHandle

func (*TxoHandle) TxoHeight

func (txo *TxoHandle) TxoHeight() int64

func (*TxoHandle) TxoHeightSpecified

func (txo *TxoHandle) TxoHeightSpecified() bool

type TxxHandle

type TxxHandle struct {
	TransIndex
	// contains filtered or unexported fields
}

TxxHandle in package chainstorage

Jump to

Keyboard shortcuts

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