C# Class BitSharp.Core.Storage.CoreStorage

Inheritance: ICoreStorage, IDisposable
显示文件 Open project: pmlyon/BitSharp Class Usage Examples

Private Properties

Property Type Description
GetBlockLock object
ReadBlockTransactions IEnumerator
TryChainHeader bool

Public Methods

Method Description
AddBlocks ( IEnumerable blocks ) : void
AddGenesisBlock ( ChainedHeader genesisHeader ) : void
ChainHeaders ( IEnumerable blockHeaders ) : void
ContainsBlockTxes ( UInt256 blockHash ) : bool
ContainsChainedHeader ( UInt256 blockHash ) : bool
CoreStorage ( IStorageManager storageManager ) : BitSharp.Common
Dispose ( ) : void
FindMaxTotalWork ( ) : ChainedHeader
GetChainedHeader ( UInt256 blockHash ) : ChainedHeader
IsBlockInvalid ( UInt256 blockHash ) : bool
MarkBlockInvalid ( UInt256 blockHash, BitSharp.Core.Domain.Chain targetChain ) : void
TryAddBlock ( BitSharp.Core.Domain.Block block ) : bool
TryChainHeader ( BlockHeader blockHeader, ChainedHeader &chainedHeader ) : bool
TryGetBlock ( UInt256 blockHash, BitSharp.Core.Domain.Block &block ) : bool
TryGetChainedHeader ( UInt256 blockHash, ChainedHeader &chainedHeader ) : bool
TryGetTransaction ( UInt256 blockHash, int txIndex, BlockTx &transaction ) : bool
TryReadBlockTransactions ( UInt256 blockHash, IEnumerator &blockTxes ) : bool
TryReadChain ( UInt256 blockHash, BitSharp.Core.Domain.Chain &chain ) : bool
TryRemoveBlockTransactions ( UInt256 blockHash ) : bool
TryRemoveChainedHeader ( UInt256 blockHash ) : bool

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
GetBlockLock ( UInt256 blockHash ) : object
ReadBlockTransactions ( UInt256 blockHash, IEnumerator blockTxes ) : IEnumerator
TryChainHeader ( BlockHeader blockHeader, ChainedHeader &chainedHeader, bool suppressEvent ) : bool

Method Details

AddBlocks() public method

public AddBlocks ( IEnumerable blocks ) : void
blocks IEnumerable
return void

AddGenesisBlock() public method

public AddGenesisBlock ( ChainedHeader genesisHeader ) : void
genesisHeader BitSharp.Core.Domain.ChainedHeader
return void

ChainHeaders() public method

public ChainHeaders ( IEnumerable blockHeaders ) : void
blockHeaders IEnumerable
return void

ContainsBlockTxes() public method

public ContainsBlockTxes ( UInt256 blockHash ) : bool
blockHash UInt256
return bool

ContainsChainedHeader() public method

public ContainsChainedHeader ( UInt256 blockHash ) : bool
blockHash UInt256
return bool

CoreStorage() public method

public CoreStorage ( IStorageManager storageManager ) : BitSharp.Common
storageManager IStorageManager
return BitSharp.Common

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

FindMaxTotalWork() public method

public FindMaxTotalWork ( ) : ChainedHeader
return BitSharp.Core.Domain.ChainedHeader

GetChainedHeader() public method

public GetChainedHeader ( UInt256 blockHash ) : ChainedHeader
blockHash UInt256
return BitSharp.Core.Domain.ChainedHeader

IsBlockInvalid() public method

public IsBlockInvalid ( UInt256 blockHash ) : bool
blockHash UInt256
return bool

MarkBlockInvalid() public method

public MarkBlockInvalid ( UInt256 blockHash, BitSharp.Core.Domain.Chain targetChain ) : void
blockHash UInt256
targetChain BitSharp.Core.Domain.Chain
return void

TryAddBlock() public method

public TryAddBlock ( BitSharp.Core.Domain.Block block ) : bool
block BitSharp.Core.Domain.Block
return bool

TryChainHeader() public method

public TryChainHeader ( BlockHeader blockHeader, ChainedHeader &chainedHeader ) : bool
blockHeader BitSharp.Core.Domain.BlockHeader
chainedHeader BitSharp.Core.Domain.ChainedHeader
return bool

TryGetBlock() public method

public TryGetBlock ( UInt256 blockHash, BitSharp.Core.Domain.Block &block ) : bool
blockHash UInt256
block BitSharp.Core.Domain.Block
return bool

TryGetChainedHeader() public method

public TryGetChainedHeader ( UInt256 blockHash, ChainedHeader &chainedHeader ) : bool
blockHash UInt256
chainedHeader BitSharp.Core.Domain.ChainedHeader
return bool

TryGetTransaction() public method

public TryGetTransaction ( UInt256 blockHash, int txIndex, BlockTx &transaction ) : bool
blockHash UInt256
txIndex int
transaction BitSharp.Core.Domain.BlockTx
return bool

TryReadBlockTransactions() public method

public TryReadBlockTransactions ( UInt256 blockHash, IEnumerator &blockTxes ) : bool
blockHash UInt256
blockTxes IEnumerator
return bool

TryReadChain() public method

public TryReadChain ( UInt256 blockHash, BitSharp.Core.Domain.Chain &chain ) : bool
blockHash UInt256
chain BitSharp.Core.Domain.Chain
return bool

TryRemoveBlockTransactions() public method

public TryRemoveBlockTransactions ( UInt256 blockHash ) : bool
blockHash UInt256
return bool

TryRemoveChainedHeader() public method

public TryRemoveChainedHeader ( UInt256 blockHash ) : bool
blockHash UInt256
return bool