Post
Topic
Board Announcements (Altcoins)
Re: [ANN] NeuCoin - Easy to use, free to try, focused on micropayments - Official
by
redfish64
on 10/10/2015, 22:48:13 UTC
Code:
            if (block.GetBlockTime() + STAKE_SPLIT_AGE > txNew.nTime)
                txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); //split stake

 this actually looks it will only split the input if it's over the time limit. not under.
else it will combine inputs to the combine threshold


The reason it splits if it's under the time limit is that:
* block.GetBlockTime() is actually the time the UTXO was staked.
* txNew.nTime is close to the current time

So as long as the current time is less than the time the UTXO was staked plus STAKE_SPLIT_AGE, then it's split.

curious. i always thought it was under

this is another version
Code:
                if (GetWeight(block.GetBlockTime(), (int64_t)txNew.nTime) < nStakeSplitAge)
                    txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); //split stake

perhaps i just dont c++ enough

I think it's just rather confusing code. I thought the same thing you did at first.