chainstorage

package
v0.0.0-...-a4a6c37 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCopyOfJsonRealChain_Helper

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

func TestCopyOfTinyChain_Helper

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

Types

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) 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) (*ConcreteAppendableChainCreator, error)

func (*ConcreteAppendableChainCreator) Create

func (cacc *ConcreteAppendableChainCreator) Create() error

func (*ConcreteAppendableChainCreator) Exists

func (cacc *ConcreteAppendableChainCreator) Exists() bool

func (*ConcreteAppendableChainCreator) Open

func (cacc *ConcreteAppendableChainCreator) Open() (IAppendableChain, *concreteAppendableChain, error)

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() error
	GetAsChainReadInterface() chainreadinterface.IBlockChain
}

type IAppendableChainFactory

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

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) 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) 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