C# Class BitSharper.Store.DiskBlockStore

Stores the block chain to disk but still holds it in memory. This is intended for desktop apps and tests. Constrained environments like mobile phones probably won't want to or be able to store all the block headers in RAM.
Inheritance: IBlockStore
Show file Open project: TangibleCryptography/BitSharper Class Usage Examples

Public Methods

Method Description
DiskBlockStore ( NetworkParameters @params, FileInfo file ) : System
Dispose ( ) : void
Get ( Sha256Hash hash ) : StoredBlock
GetChainHead ( ) : StoredBlock
Put ( StoredBlock block ) : void
SetChainHead ( StoredBlock chainHead ) : void

Private Methods

Method Description
CreateNewStore ( NetworkParameters @params, FileInfo file ) : void
Load ( FileInfo file ) : void

Method Details

DiskBlockStore() public method

public DiskBlockStore ( NetworkParameters @params, FileInfo file ) : System
@params NetworkParameters
file System.IO.FileInfo
return System

Dispose() public method

public Dispose ( ) : void
return void

Get() public method

public Get ( Sha256Hash hash ) : StoredBlock
hash Sha256Hash
return StoredBlock

GetChainHead() public method

public GetChainHead ( ) : StoredBlock
return StoredBlock

Put() public method

public Put ( StoredBlock block ) : void
block StoredBlock
return void

SetChainHead() public method

public SetChainHead ( StoredBlock chainHead ) : void
chainHead StoredBlock
return void