From 05eeef4d949c581e9cfa19af2a7702eb36805c15 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 12 Dec 2011 13:52:15 +0300 Subject: [PATCH] patch for bitcoind --- server/patches/main.cpp.diff | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/server/patches/main.cpp.diff b/server/patches/main.cpp.diff index 29b767f0a..e9a6f0626 100644 --- a/server/patches/main.cpp.diff +++ b/server/patches/main.cpp.diff @@ -1,20 +1,28 @@ diff --git a/src/main.cpp b/src/main.cpp -index 45de76a..6cd304f 100644 +index 45de76a..8a9002f 100644 --- a/src/main.cpp +++ b/src/main.cpp -@@ -414,6 +414,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi - return error("AcceptToMemoryPool() : ConnectInputs failed %s", hash.ToString().substr(0,10).c_str()); - } +@@ -2787,16 +2787,19 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) -+ /* - // Don't accept it if it can't get into a block - if (nFees < GetMinFee(1000, true, true)) - return error("AcceptToMemoryPool() : not enough fees"); -@@ -442,6 +443,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi - dFreeCount += nSize; - } - } -+ */ - } + // Size limits + unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK); +- if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN) +- continue; ++ //if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN) ++ // continue; + int nTxSigOps = tx.GetSigOpCount(); +- if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) +- continue; ++ //if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) ++ // continue; - // Store transaction in memory + // Transaction fee required depends on block size + bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority)); + int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, true); + ++ // electrum server: do not check fees ++ nMinFee = 0; ++ + // Connecting shouldn't fail due to dependency on other memory pool transactions + // because we're already processing them in order of dependency + map mapTestPoolTmp(mapTestPool);