I cleaned up the code removing the second output in that transaction and commenting out all the reference to FOUNDATION address.
Yep, we now have the new wallet code. And setup the pool again.
The real point is: the problem was non existent at all.
This was simply not the case. Your wallet was Rejecting blocks because of the very fact that you had kept the second transaction requirement in the code. Upon submitting a block to the wallet, it was REJECTING all found blocks because the "coinbase transaction does not pay the dev address".
So, the normal solution to this (as in X13 coins and others), is to locate the FOUNDATION address (in main.h) and modify the pool software to automatically generate a second coinbase transaction (usually referred to as the tx_charity or tx_donation). The address has to be encoded as an script pub key - which is trivial.
However, even after doing this - the wallet was still rejecting the coins.
Also we truncated the COIN constant value to be sure that the total amount we decided to support would fit without overflowing.
And this is all fine and dandy when it comes to your own coin's implementation of how it displays it. But as (all? nearly all?) other coins have the 8.8 notation - presumably most exchange/pool software is coded to handle that sort of storage - database rows would be typed potentially as 8.8 Deciminal types. This coin is using 10.6, which affects this type of storage very differently. Of course if people are using double floating point notation in all places, it should be ok - But expect hiccups.
We have modified our systems to display the correct Gryfen mined (basically x 100 does the trick) for clarity.
But be prepared for supporting any exchange adding this coin if you want them to display the coins properly.
It is strange that you got that message because the code was the following:
// gryfencrypto:
int64_t nExtraFee = 0;//nFees * EXTRA_FEE_PCT;
//if(nExtraFee < MIN_EXTRA_FEE) nExtraFee=MIN_EXTRA_FEE;
if (vtx[0].vout[1].nValue < nExtraFee)
return error("ConnectBlock() : coinbase does not pay enough to dev addresss");
is not possible that nValue is ever <0;
anyway I have found a serious bug I fixed right now:
In main.cpp CheckBlock, line 2224:
// Coinbase output should be empty if proof-of-stake block
//gryfencoin: added compatibility check because there are some transactions with 2 vout and vout[1] not empty
if(vtx[0].vout.size() == 1 )
{
if(!vtx[0].vout[0].IsEmpty())
return error("CheckBlock() : coinbase output not empty for proof-of-stake block");
}
else if (vtx[0].vout.size() == 2)
{
if ((!vtx[0].vout[0].IsEmpty() || !vtx[0].vout[1].IsEmpty() ))
return error("CheckBlock() : coinbase output not empty for proof-of-stake block");
}
else
return error("CheckBlock() : something really wrong happened!");
that should avoid orphan transaction and invalid blocks.