CBlock::SignBlock method

From Peercoin Wiki
Jump to: navigation, search

Source code

The CBlock::SignBlock method code can be found in the main.cpp file (v0.4.0ppc).


Signs a Peercoin block.



Name Type Description
keystore const CKeyStore& Reference to the wallet keystore

Return value

Type Description
bool true if the block was successfully signed, otherwise false


Why does the block need to be signed? It seems to be a feature of ppcoin not present in bitcoin.
This is explained in the white paper, if the block is not signed, an attacker can reuse other blocks' coinstake in his own block.

Feel free to add your own questions in this FAQ