From 5d96372eab2a63ce00f4a523e7abaa6b34d5284b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 11 Jun 2012 12:50:30 +0400 Subject: [PATCH 1/1] patch for 0.6.2 --- patches/bitcoin-0.6.2.diff | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 patches/bitcoin-0.6.2.diff diff --git a/patches/bitcoin-0.6.2.diff b/patches/bitcoin-0.6.2.diff new file mode 100644 index 0000000..08af2f8 --- /dev/null +++ b/patches/bitcoin-0.6.2.diff @@ -0,0 +1,84 @@ +--- main.cpp 2012-05-24 01:24:54.000000000 +0400 ++++ main.cpp.orig 2012-05-08 21:34:24.000000000 +0400 +@@ -3222,21 +3222,18 @@ + + // Size limits + unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); +- //if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN) +- // continue; ++ if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN) ++ continue; + + // Legacy limits on sigOps: + unsigned int nTxSigOps = tx.GetLegacySigOpCount(); +- //if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) +- // continue; ++ if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) ++ continue; + + // Transaction fee required depends on block size + bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority)); + int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK); + +- // 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); +--- bitcoinrpc.cpp 2012-06-10 20:54:28.000000000 +0400 ++++ bitcoinrpc.cpp.orig 2012-05-08 21:34:23.000000000 +0400 +@@ -1496,45 +1496,7 @@ + return entry; + } + +-Value importtransaction(const Array& params, bool fHelp) +-{ +- string hexdump; +- if (fHelp || params.size() != 1 || (hexdump=params[0].get_str()).size()&1) +- throw runtime_error( +- "importtransaction \n" +- "Import an offline transaction to announce it into the network"); +- +- std::vector rawtx; +- for (int i=0; i> tx; +- CInv inv(MSG_TX, tx.GetHash()); +- +- CTxDB txdb("r"); +- if(! tx.AcceptToMemoryPool(txdb, true)) throw JSONRPCError(-4, "Transaction not accepted to memory pool."); +- CDataStream msg(rawtx, SER_NETWORK, PROTOCOL_VERSION); +- RelayMessage(inv, msg); +- return tx.GetHash().GetHex(); +- } +- catch (std::exception& e) +- { +- throw JSONRPCError(-4, "Exception while parsing the transaction data."); +- } +- +-} +- +- + +- + Value backupwallet(const Array& params, bool fHelp) + { + if (fHelp || params.size() != 1) +@@ -2093,7 +2055,6 @@ + { "listsinceblock", &listsinceblock, false }, + { "dumpprivkey", &dumpprivkey, false }, + { "importprivkey", &importprivkey, false }, +- { "importtransaction", &importtransaction, false }, + }; + + CRPCTable::CRPCTable() -- 1.7.1