close session
[electrum-server.git] / patches / main.cpp.diff
1 diff -u -r bitcoin/src/main.cpp bitcoin-electrum/src/main.cpp
2 --- bitcoin/src/main.cpp        2011-12-28 21:23:40.844812872 +0200
3 +++ bitcoin-electrum/src/main.cpp       2011-12-28 17:47:27.000000000 +0200
4 @@ -2965,13 +2965,16 @@
5  
6              // Size limits
7              unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK);
8 -            if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN)
9 -                continue;
10 +            //if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN)
11 +            //    continue;
12  
13              // Transaction fee required depends on block size
14              bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
15              int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK);
16  
17 +           // Electrum server: do not check fees
18 +           nMinFee = 0;
19 +
20              // Connecting shouldn't fail due to dependency on other memory pool transactions
21              // because we're already processing them in order of dependency
22              map<uint256, CTxIndex> mapTestPoolTmp(mapTestPool);
23 @@ -2981,8 +2984,8 @@
24              int nTxSigOps = 0;
25              if (!tx.ConnectInputs(mapInputs, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, nFees, false, true, nTxSigOps, nMinFee))
26                  continue;
27 -            if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
28 -                continue;
29 +            //if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
30 +            //    continue;
31              swap(mapTestPool, mapTestPoolTmp);
32  
33              // Added