Свойство | Type | Description | |
---|---|---|---|
AddCoinbaseTransaction | void | ||
AddTransaction | void | ||
Block | System | ||
BuildMerkleTree | IList |
||
CalculateHash | |||
CalculateMerkleRoot | |||
CheckMerkleRoot | void | ||
CheckProofOfWork | bool | ||
CheckTimestamp | void | ||
CheckTransactions | void | ||
CreateNextBlock | |||
Solve | void | ||
WriteHeader | void |
Méthode | Description | |
---|---|---|
BitcoinSerializeToStream ( Stream stream ) : void | ||
Block ( |
Constructs a block object from the BitCoin wire format.
|
|
CloneAsHeader ( ) : |
Returns a copy of the block, but without any transactions.
|
|
CreateNextBlock ( |
||
Equals ( object o ) : bool | ||
GetDifficultyTargetAsInteger ( ) : |
Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash. Inside a block the target is represented using a compact form. If this form decodes to a value that is out of bounds, an exception is thrown.
|
|
GetHashCode ( ) : int | ||
GetWork ( ) : |
Returns the work represented by this block. Work is defined as the number of tries needed to solve a block in the average case. Consider a difficulty target that covers 5% of all possible hash values. Then the work of the block will be 20. As the target gets lower, the amount of work goes up. |
|
ToString ( ) : string |
Returns a multi-line string containing a description of the contents of the block. Use for debugging purposes only.
|
|
Verify ( ) : void |
Verifies both the header and that the transactions hash to the merkle root.
|
|
VerifyHeader ( ) : void |
Checks the block data to ensure it follows the rules laid out in the network parameters. Specifically, throws an exception if the proof of work is invalid, if the timestamp is too far from what it should be. This is not everything that is required for a block to be valid, only what is checkable independent of the chain and without a transaction index.
|
|
VerifyTransactions ( ) : void |
Checks the block contents
|
Méthode | Description | |
---|---|---|
Parse ( ) : void |
Méthode | Description | |
---|---|---|
AddCoinbaseTransaction ( byte pubKeyTo ) : void |
Adds a coinbase transaction to the block. This exists for unit tests.
|
|
AddTransaction ( |
Adds a transaction to this block.
|
|
Block ( |
Special case constructor, used for the genesis node, cloneAsHeader and unit tests.
|
|
BuildMerkleTree ( ) : IList |
||
CalculateHash ( ) : |
Calculates the block hash by serializing the block and hashing the resulting bytes.
|
|
CalculateMerkleRoot ( ) : |
||
CheckMerkleRoot ( ) : void | ||
CheckProofOfWork ( bool throwException ) : bool |
Returns true if the hash of the block is OK (lower than difficulty target).
|
|
CheckTimestamp ( ) : void | ||
CheckTransactions ( ) : void | ||
CreateNextBlock ( |
Returns a solved block that builds on top of this one. This exists for unit tests.
|
|
Solve ( ) : void |
Finds a value of nonce that makes the blocks hash lower than the difficulty target. This is called mining, but solve() is far too slow to do real mining with. It exists only for unit testing purposes and is not a part of the public API. This can loop forever if a solution cannot be found solely by incrementing nonce. It doesn't change extraNonce. |
|
WriteHeader ( Stream stream ) : void |
public BitcoinSerializeToStream ( Stream stream ) : void | ||
stream | Stream | |
Résultat | void |
public Block ( |
||
@params | ||
payloadBytes | byte | |
Résultat | System |
public CreateNextBlock ( |
||
to | ||
Résultat |
public GetDifficultyTargetAsInteger ( ) : |
||
Résultat |