X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=334125fbe98f68d2e56c7409afe36c1fc94aceb6;hb=44f601723c3a1c68de6e613a897e9f8418eb874a;hp=25634dfd186767adc64d5fac1caddc34bbf940e1;hpb=0561bbd1c69263dceb24ffacf850788e6e961a13;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index 25634df..334125f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -58,8 +58,7 @@ double dHashesPerSec; int64 nHPSTimerStart; // Settings -int64 nTransactionFee = 0; -int64 nBalanceReserve = 0; +int64 nTransactionFee = MIN_TX_FEE; @@ -1380,7 +1379,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) 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)) @@ -1396,7 +1395,8 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) 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; @@ -2091,6 +2091,11 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) } printf("ProcessBlock: ACCEPTED\n"); + + // ppcoin: if responsible for sync-checkpoint send it + if (pfrom && !CSyncCheckpoint::strMasterPrivKey.empty()) + Checkpoints::SendSyncCheckpoint(hashBestChain); + return true; }