Hi all, i am looking at source code where is the piece for only generate pos blocks when the mempool is not empty, but i cant find it, some help will be eternally indebted
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.