nTxPos += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);
MapPrevTx mapInputs;
- if (!(tx.IsCoinBase() || tx.IsCoinStake()))
+ if (!tx.IsCoinBase())
{
bool fInvalid;
if (!tx.FetchInputs(txdb, mapQueuedChanges, true, false, mapInputs, fInvalid))
return DoS(100, error("ConnectBlock() : too many sigops"));
}
- nFees += tx.GetValueIn(mapInputs)-tx.GetValueOut();
+ if (!tx.IsCoinStake())
+ nFees += tx.GetValueIn(mapInputs)-tx.GetValueOut();
if (!tx.ConnectInputs(txdb, mapInputs, mapQueuedChanges, posThisTx, pindex, true, false, fStrictPayToScriptHash))
return false;