CWallet::CreateCoinStake method

From Peercoin Wiki
Jump to: navigation, search

Source code

The CWallet::CreateCoinStake method code can be found in the wallet.cpp file (v0.4.0ppc).

Description

Create coin stake transaction.

Signature

Parameters

Name Type Description
keystore const CKeyStore& Reference to the wallet keystore
nBits unsigned int The current proof-of-stake target
nSearchInterval int64 <TODO>
txNew CTransaction& The coinstake tx

Return value

Type Description
bool true if the coinstake transaction was successfully generated, otherwise false

FAQ

What is a stake in Peercoin?
<TODO>
What is a coinstake transaction?
<TODO>
How are coins selected? [1]
<TODO>
What is nSearchInterval parameter and what is it used for? [2]
<TODO>
What are nStakeSplitAge et nCombineThreshold variables and what are they used for? [3]
nStakeSplitAge related thread on peercointalk: https://www.peercointalk.org/index.php?topic=4144
What is nMaxStakeSearchInterval variable and what is it used for? [4]
<TODO>
What is the n variable and what is it used for? [5]
<TODO>
What is the CheckStakeKernelHash function used for?
The CheckStakeKernelHash function is described in detail here
What is the transaction GetCoinAge method used for?
The transaction GetCoinAge method is described in detail here
What is the GetProofOfStakeReward function used for?
The GetProofOfStakeReward function is described in detail here
It looks like the constraints on the inputs are not enforced when a new block is received. Why?
Question for SK. Related function: CheckProofOfStake function
Why stake pubkey outpoints have to be converted to pubkeyhash like shown here?
<TODO>


Feel free to add your own questions in this FAQ

Links

Related posts on peercointalk