Feathercoin Core 0.11.1.1 Launch
-
@ghostlander said:
@lizhi Most pools use v0.8. We can patch v0.9 to 100 confirmations.
I support that!!
-
I’ve checked the code for 0.8.7.3 and 0.9.3.1 and I think the problem which was observed by Lizhi only exists in the test net.
On main net we are in COINBASE_MATURITY = 240 already:
From main.h:
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int COINBASE_MATURITY = 30; /** Coinbase maturity after block 145000 **/ static const int COINBASE_MATURITY_NEW = 60*4; /** Block at which COINBASE_MATURITY_NEW comes into effect **/ static const int COINBASE_MATURITY_SWITCH = 145000;
As we passed block 145000 long ago, we are on COINBASE_MATURTY= 60 *4
-
No , I don’t think so. COINBASE_MATURITY_NEW is unuesd in main.cpp . We check Inputs with COINBASE_MATURITY.
-
set COINBASE_MATURITY to 100
https://github.com/FeatherCoin/Feathercoin/commit/d8d8e80e98e2f1af09a7c15293368972fb2ed43c
-
@lizhi said:
No , I don’t think so. COINBASE_MATURITY_NEW is unuesd in main.cpp . We check Inputs with COINBASE_MATURITY.
There are two different procedures in main.cpp, with different return values:
Around line 1068:
int CMerkleTx::GetBlocksToMaturity() const { if (!IsCoinBase()) return 0; return max(0, (COINBASE_MATURITY+1) - GetDepthInMainChain()); }
Around line 1710:
int GetRequiredMaturityDepth(int nHeight) { if (nHeight >= COINBASE_MATURITY_SWITCH) { return COINBASE_MATURITY_NEW; } else { return COINBASE_MATURITY; } }
and finally around line 1747:
if (coins.IsCoinBase()) { if (nSpendHeight - coins.nHeight < COINBASE_MATURITY) return state.Invalid( error("CheckInputs() : tried to spend coinbase at depth %d", nSpendHeight - coins.nHeight), REJECT_INVALID, "bad-txns-premature-spend-of-coinbase"); }
The last one is in procedure checkinputs, so I think it is not critical.
I think the 2nd one would create errors, if not returning the same value for all clients, at least for mining clients, but again, as the code is the same in 0.8.7.3 and 0.9.3.1 I don’t see a problem here.
-
GetRequiredMaturityDepth is unused . No switch to COINBASE_MATURITY_NEW.
COINBASE_MATURITY is used, but it is 30 . -
@lizhi
Then let’s patch it to 100 ! :-)We even may use COINBASE_MATURITY_NEW, if there is no other way to switch back to maturity 100
-
Compatible COINBASE_MATURITY = 100
0.11.2.2
https://github.com/FeatherCoin/Feathercoin/commit/8709f1902ae3432569b3e8e9430d7055b0d7fd5e
https://github.com/FeatherCoin/Feathercoin/commit/6e80bff85e7549bfa220a15d794abf4756f47f10 -
Should I upgrade my node to 0.11.2.2 ?
-
No, your 0.11.2.1 should work right if you don’t run pool.