CTransaction::GetCoinAge method

From Peercoin Wiki
Jump to: navigation, search

Source

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

Description

Total coin age spent in transaction, in the unit of coin-days.

Only those coins meeting minimum age requirement counts. As those transactions not in main chain are not currently indexed so we might not find out about their coin age. Older transactions are guaranteed to be in main chain by sync-checkpoint. This rule is introduced to help nodes establish a consistent view of the coin age (trust score) of competing branches.

Signature

Parameters

Name Type Description
txdb CTxDB& Reference to the transaction database
nCoinAge uint64& The returned calculated coin age in coin-days

Return value

Type Description
bool true if coinage could be successfully calculated (or tx is CoinBase), false otherwise

FAQ

<TODO>
<TODO>


Feel free to add your own questions in this FAQ

Links