Method | Description | |
---|---|---|
Add ( |
Processes a received block and tries to add it to the chain. If there's something wrong with the block an exception is thrown. If the block is OK but cannot be connected to the chain at this time, returns false. If the block can be connected to the chain, returns true.
|
|
AddWallet ( |
Add a wallet to the BlockChain. Note that the wallet will be unaffected by any blocks received while it was not part of this BlockChain. This method is useful if the wallet has just been created, and its keys have never been in use, or if the wallet has been loaded along with the BlockChain
|
|
BlockChain ( |
Constructs a BlockChain that has no wallet at all. This is helpful when you don't actually care about sending and receiving coins but rather, just want to explore the network data structures.
|
|
BlockChain ( |
Constructs a BlockChain connected to the given list of wallets and a store.
|
|
BlockChain ( |
Constructs a BlockChain connected to the given wallet and store. To obtain a Wallet you can construct one from scratch, or you can deserialize a saved wallet from disk using Wallet.LoadFromFile. For the store you can use a MemoryBlockStore if you don't care about saving the downloaded data, or a BoundedOverheadBlockStore if you'd like to ensure fast start-up the next time you run the program. |
Method | Description | |
---|---|---|
Add ( |
||
CheckDifficultyTransitions ( |
Throws an exception if the blocks difficulty is not correct.
|
|
ConnectBlock ( |
||
FindSplit ( |
Locates the point in the chain at which newStoredBlock and chainHead diverge. Returns null if no split point was found (ie they are part of the same chain).
|
|
GetPartialChain ( |
Returns the set of contiguous blocks between 'higher' and 'lower'. Higher is included, lower is not.
|
|
HandleNewBestChain ( |
Called as part of connecting a block when the new block results in a different chain having higher total work.
|
|
ScanTransactions ( |
For the transactions in the given block, update the txToWalletMap such that each wallet maps to a list of transactions for which it is relevant.
|
|
SendTransactionsToWallet ( |
||
TryConnectingUnconnected ( ) : void |
For each block in unconnectedBlocks, see if we can now fit it on top of the chain and if so, do so.
|
public BlockChain ( |
||
@params | ||
blockStore | IBlockStore | |
return | System |
public BlockChain ( |
||
@params | ||
wallets | IEnumerable |
|
blockStore | IBlockStore | |
return | System |
public BlockChain ( |
||
@params | ||
wallet | ||
blockStore | IBlockStore | |
return | System |