I was looking at that too. But I think it there is no additional code (I compared to blackcoins code). I think the blackcoin PoS protocol by itself will not try to create a pos block if there is 0 reward (nSubsidy in main.cpp).
A transaction in the mempool (that is paying the fee of course) means nSubsidy is grater than 0, giving the PoS kernel something to work with and it then tries to sign a block.
So you would have to dig deeper into blackcoins PoS kernel to understand this (kernel.cpp). I did not go that far
Edit: I might be wrong, this might be older legacy from the peercoin staking implementation. Maybe look into wallet.cpp how it handles staking. The answer might be there. But comparing the code, nothing is changed considerably from blackcoin to onecoin in wallet.cpp.
You are right. It is in wallet.cpp: https://github.com/theone-and-not-only-coin/onecoin/blob/master/src/wallet.cpp#L1722
// Calculate coin age reward
{
uint64_t nCoinAge;
CTxDB txdb("r");
if (!txNew.GetCoinAge(txdb, pindexPrev, nCoinAge))
return error("CreateCoinStake : failed to calculate coin age");
int64_t nReward = GetProofOfStakeReward(pindexPrev, nCoinAge, nFees);
if (nReward <= 0)
return false;
nCredit += nReward;
}
If the reward is 0 the wallet will not try to stake. This part of the code is unchanged from BlackCoin.
If you plan on implementing this feature in your coin you just have to set nSubsidy for GetProofOfstakeReward to 0
// miner's coin stake reward
int64_t GetProofOfStakeReward(const CBlockIndex* pindexPrev, int64_t nCoinAge, int64_t nFees)
{
int64_t nSubsidy = 0;
LogPrint("creation", "GetProofOfStakeReward(): create=%s nCoinAge=%d\n", FormatMoney(nSubsidy), nCoinAge);
return nSubsidy + nFees;
}