Post
Topic
Board Altcoin Discussion
Re: BOUNTY - 1500 HUC (approx 2+ BTC) - Huntercoin Mining Bug
by
rsnel
on 09/02/2014, 10:16:22 UTC
My guess:

Failure probably is in  CBlock::ConnectBlock() at line 1319.

nFees is initailized at 0, never changed and then vtx[0].getValueOut is checked against GetBlockValue(pindex->nHeight, nFees), since nFees == 0 this silently fails.

Edit:

Code:
keypool keep 882
InvalidChainFound: invalid block=7ee9a9e1ff1ffc925894  height=39735  work=216983967497595029143
InvalidChainFound:  current best=77c39192bb4a4a8a88f2  height=39734  work=216897912273401034588
ERROR: SetBestChain() : ConnectBlock failed
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED
ERROR: BitcoinMiner : ProcessBlock, block not accepted

As can be seen here: CBlock::SetBestChain() craps out at if(!ConnectBlock()) at line 1451. First visible error is from InvalidChainFound(), so ConnectBlock() fails silently (could also be txdb.Write(), but seems unlikely).

Edit2: mmmm, if nFees really doesn't get updated, why doesn't this function fail more often?