Sounds good, It does appear to be more stable now, good work. I do have a question though My staking is only about 0.02% of my coins at any given time. Is that normal?
the "spendable" are staking too, I was never entirely sure what the "staking" really meant... someone else may know??
Read through your source code or have someone dependable do so and report back your Staking information.
Some relevant sections for you, pulled from
https://github.com/greencoin-dev/GreenCoinV2/blob/master/src/wallet.cpp can be found below. Repository could use a bit of cleaning, lot of references to other PoS style coins that resulted from the original fork. I'll do some pull requests later today if I have a few minutes.
Also in the header you mention the following method for unlocking your wallet for staking. May be easier to note they can just do Settings -> Unlock Wallet -> Type in password and leave the "For staking only" flag unchecked.
Now when you want to stake, open your wallet and leave it open. In the console type:
walletpassphrase <your real wallet password> <time> true
*time is in seconds. Just put in something big like 10000000.
*the final Boolean is for staking only (true/false), so when true, your wallet will be open and staking, but all of the other functions like sending coins are still locked. Ctrl-L clears the screen so your password isn't visible.
As always, good luck.
// Settings
int64_t nTransactionFee = MIN_TX_FEE;
int64_t nReserveBalance = 0;
int64_t nMinimumInputValue = 0;
static int64_t GetStakeCombineThreshold() { return 1000 * COIN; }
static int64_t GetStakeSplitThreshold() { return 2 * GetStakeCombineThreshold(); }
// ppcoin: total coins staked (non-spendable until maturity)
int64_t CWallet::GetStake() const
{
int64_t nTotal = 0;
LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
if (pcoin->IsCoinStake() && pcoin->GetBlocksToMaturity() > 0 && pcoin->GetDepthInMainChain() > 0)
nTotal += CWallet::GetCredit(*pcoin);
}
return nTotal;
}
uint64_t CWallet::GetStakeWeight() const
{
// Choose coins to use
int64_t nBalance = GetBalance();
if (nBalance <= nReserveBalance)
return 0;
vector<const CWalletTx*> vwtxPrev;
set<pair<const CWalletTx*,unsigned int> > setCoins;
int64_t nValueIn = 0;
if (!SelectCoinsForStaking(nBalance - nReserveBalance, GetTime(), setCoins, nValueIn))
return 0;
if (setCoins.empty())
return 0;
uint64_t nWeight = 0;
int64_t nCurrentTime = GetTime();
CTxDB txdb("r");
LOCK2(cs_main, cs_wallet);
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
{
if (pcoin.first->GetDepthInMainChain() >= nStakeMinConfirmations)
nWeight += pcoin.first->vout[pcoin.second].nValue;
}
return nWeight;
}