GetDifficulty function

From Peercoin Wiki
Jump to: navigation, search

Source code

The GetDifficulty function code can be found in the bitcoinrpc.cpp file (v0.4.0ppc).

Description

Calculate difficulty from block parameter or uses current best block if block parameter is NULL. If current best block is NULL returns 1.0, the minimal difficulty value.

Signature

Parameters

Name Type Description
blockindex const CBlockIndex* Pointer to the block from which we want to calculate difficulty. Defaults to NULL.

Return value

Type Description
double Calculated difficulty

FAQ

TODO
TODO

Links