remove deprecated patches
authorThomasV <thomasv@gitorious>
Wed, 13 Jun 2012 17:54:40 +0000 (21:54 +0400)
committerThomasV <thomasv@gitorious>
Wed, 13 Jun 2012 17:54:40 +0000 (21:54 +0400)
patches/bitcoin-0.5.1.diff [deleted file]
patches/bitcoin-0.5.2.diff [deleted file]
patches/bitcoin-0.6.0.diff [deleted file]
patches/bitcoinrpc.cpp.diff [deleted file]
patches/main.cpp.diff [deleted file]

diff --git a/patches/bitcoin-0.5.1.diff b/patches/bitcoin-0.5.1.diff
deleted file mode 100644 (file)
index 4ed8468..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-diff -ur bitcoin-0.5.1/src/bitcoinrpc.cpp bitcoin-0.5.1-electrum/src/bitcoinrpc.cpp
---- bitcoin-0.5.1/src/bitcoinrpc.cpp   2011-12-13 22:56:26.000000000 +0200
-+++ bitcoin-0.5.1-electrum/src/bitcoinrpc.cpp  2011-12-27 22:44:06.494789148 +0200
-@@ -1362,7 +1362,43 @@
-     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 <hexdata>\n"
-+            "Import an offline transaction to announce it into the network");
-+
-+  std::vector<unsigned char> rawtx;
-+  for (int i=0; i<hexdump.size(); i+=2)
-+    {
-+      int v;
-+      if (sscanf(hexdump.substr(i,2).c_str(), "%x", &v)!=1)
-+      throw JSONRPCError(-4, "Error in hex data.");
-+      rawtx.push_back((unsigned char)v);
-+    }
-+try
-+  {
-+    CDataStream ss(rawtx);
-+    CTransaction tx;
-+    ss >> tx;
-+    CInv inv(MSG_TX, tx.GetHash());
-+    if(! tx.AcceptToMemoryPool(true)) throw JSONRPCError(-4, "Transaction not accepted to memory pool.");
-+    CDataStream msg(rawtx);
-+    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)
-@@ -1846,6 +1882,7 @@
-     make_pair("settxfee",               &settxfee),
-     make_pair("getmemorypool",          &getmemorypool),
-     make_pair("listsinceblock",        &listsinceblock),
-+    make_pair("importtransaction",      &importtransaction),
- };
- map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
-diff -ur bitcoin-0.5.1/src/main.cpp bitcoin-0.5.1-electrum/src/main.cpp
---- bitcoin-0.5.1/src/main.cpp 2011-12-13 22:56:26.000000000 +0200
-+++ bitcoin-0.5.1-electrum/src/main.cpp        2011-12-27 22:44:18.714789152 +0200
-@@ -2820,16 +2820,19 @@
-             // 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;
-             // 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<uint256, CTxIndex> mapTestPoolTmp(mapTestPool);
diff --git a/patches/bitcoin-0.5.2.diff b/patches/bitcoin-0.5.2.diff
deleted file mode 100644 (file)
index bb2d438..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-diff -ur bitcoin-0.5.2/src/bitcoinrpc.cpp bitcoin-0.5.2-electrum/src/bitcoinrpc.cpp
---- bitcoin-0.5.2/src/bitcoinrpc.cpp   2012-01-06 01:19:29.000000000 +0200
-+++ bitcoin-0.5.2-electrum/src/bitcoinrpc.cpp  2012-02-16 12:59:03.000000000 +0200
-@@ -1362,7 +1362,43 @@
-     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 <hexdata>\n"
-+            "Import an offline transaction to announce it into the network");
-+
-+  std::vector<unsigned char> rawtx;
-+  for (int i=0; i<hexdump.size(); i+=2)
-+    {
-+      int v;
-+      if (sscanf(hexdump.substr(i,2).c_str(), "%x", &v)!=1)
-+      throw JSONRPCError(-4, "Error in hex data.");
-+      rawtx.push_back((unsigned char)v);
-+    }
-+try
-+  {
-+    CDataStream ss(rawtx);
-+    CTransaction tx;
-+    ss >> tx;
-+    CInv inv(MSG_TX, tx.GetHash());
-+    if(! tx.AcceptToMemoryPool(true)) throw JSONRPCError(-4, "Transaction not accepted to memory pool.");
-+    CDataStream msg(rawtx);
-+    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)
-@@ -1846,6 +1882,7 @@
-     make_pair("settxfee",               &settxfee),
-     make_pair("getmemorypool",          &getmemorypool),
-     make_pair("listsinceblock",        &listsinceblock),
-+    make_pair("importtransaction",      &importtransaction),
- };
- map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
-diff -ur bitcoin-0.5.2/src/main.cpp bitcoin-0.5.2-electrum/src/main.cpp
---- bitcoin-0.5.2/src/main.cpp 2012-01-06 01:19:29.000000000 +0200
-+++ bitcoin-0.5.2-electrum/src/main.cpp        2012-02-16 13:02:55.000000000 +0200
-@@ -2819,16 +2819,19 @@
-             // 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;
-             // Transaction fee required depends on block size
-             bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
-             int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
-+          // 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<uint256, CTxIndex> mapTestPoolTmp(mapTestPool);
diff --git a/patches/bitcoin-0.6.0.diff b/patches/bitcoin-0.6.0.diff
deleted file mode 100644 (file)
index 3baea4f..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -ur bitcoin-0.6.0/src/bitcoinrpc.cpp bitcoin-0.6.0-electrum/src/bitcoinrpc.cpp
---- bitcoin-0.6.0/src/bitcoinrpc.cpp   2012-03-29 22:11:04.000000000 +0300
-+++ bitcoin-0.6.0-electrum/src/bitcoinrpc.cpp  2012-03-31 12:30:50.631339067 +0300
-@@ -1486,7 +1486,43 @@
-     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 <hexdata>\n"
-+            "Import an offline transaction to announce it into the network");
-+
-+  std::vector<unsigned char> rawtx;
-+  for (int i=0; i<hexdump.size(); i+=2)
-+    {
-+      int v;
-+      if (sscanf(hexdump.substr(i,2).c_str(), "%x", &v)!=1)
-+      throw JSONRPCError(-4, "Error in hex data.");
-+      rawtx.push_back((unsigned char)v);
-+    }
-+try
-+  {
-+    CDataStream ss(rawtx);
-+    CTransaction tx;
-+    ss >> tx;
-+    CInv inv(MSG_TX, tx.GetHash());
-+    if(! tx.AcceptToMemoryPool(true)) throw JSONRPCError(-4, "Transaction not accepted to memory pool.");
-+    CDataStream msg(rawtx);
-+    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)
-@@ -2047,7 +2083,8 @@
-     make_pair("getmemorypool",          &getmemorypool),
-     make_pair("listsinceblock",         &listsinceblock),
-     make_pair("dumpprivkey",            &dumpprivkey),
--    make_pair("importprivkey",          &importprivkey)
-+    make_pair("importprivkey",          &importprivkey),
-+    make_pair("importtransaction",      &importtransaction)
- };
- map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
-diff -ur bitcoin-0.6.0/src/main.cpp bitcoin-0.6.0-electrum/src/main.cpp
---- bitcoin-0.6.0/src/main.cpp 2012-03-29 22:11:04.000000000 +0300
-+++ bitcoin-0.6.0-electrum/src/main.cpp        2012-03-31 12:36:41.711339168 +0300
-@@ -3164,18 +3164,21 @@
-             // 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;
-             // Legacy limits on sigOps:
-             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<uint256, CTxIndex> mapTestPoolTmp(mapTestPool);
diff --git a/patches/bitcoinrpc.cpp.diff b/patches/bitcoinrpc.cpp.diff
deleted file mode 100644 (file)
index 187b1b4..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -u -r bitcoin/src/bitcoinrpc.cpp bitcoin-electrum/src/bitcoinrpc.cpp
---- bitcoin/src/bitcoinrpc.cpp 2011-12-28 21:23:40.844812872 +0200
-+++ bitcoin-electrum/src/bitcoinrpc.cpp        2011-12-28 17:31:24.000000000 +0200
-@@ -1437,6 +1437,38 @@
-     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 <hexdata>\n"
-+            "Import an offline transaction to announce it into the network");
-+
-+  std::vector<unsigned char> rawtx;
-+  for (int i=0; i<hexdump.size(); i+=2)
-+    {
-+      int v;
-+      if (sscanf(hexdump.substr(i,2).c_str(), "%x", &v)!=1)
-+      throw JSONRPCError(-4, "Error in hex data.");
-+      rawtx.push_back((unsigned char)v);
-+    }
-+try
-+  {
-+    CDataStream ss(rawtx);
-+    CTransaction tx;
-+    ss >> tx;
-+    CInv inv(MSG_TX, tx.GetHash());
-+    if(! tx.AcceptToMemoryPool(true)) throw JSONRPCError(-4, "Transaction not accepted to memory pool.");
-+    CDataStream msg(rawtx);
-+    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)
- {
-@@ -1950,7 +1982,8 @@
-     make_pair("getmemorypool",          &getmemorypool),
-     make_pair("listsinceblock",         &listsinceblock),
-     make_pair("dumpprivkey",            &dumpprivkey),
--    make_pair("importprivkey",          &importprivkey)
-+    make_pair("importprivkey",          &importprivkey),
-+    make_pair("importtransaction",    &importtransaction)
- };
- map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
diff --git a/patches/main.cpp.diff b/patches/main.cpp.diff
deleted file mode 100644 (file)
index 5d2ff68..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -u -r bitcoin/src/main.cpp bitcoin-electrum/src/main.cpp
---- bitcoin/src/main.cpp       2011-12-28 21:23:40.844812872 +0200
-+++ bitcoin-electrum/src/main.cpp      2011-12-28 17:47:27.000000000 +0200
-@@ -2965,13 +2965,16 @@
-             // 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;
-             // 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<uint256, CTxIndex> mapTestPoolTmp(mapTestPool);
-@@ -2981,8 +2984,8 @@
-             int nTxSigOps = 0;
-             if (!tx.ConnectInputs(mapInputs, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, nFees, false, true, nTxSigOps, nMinFee))
-                 continue;
--            if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
--                continue;
-+            //if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
-+            //    continue;
-             swap(mapTestPool, mapTestPoolTmp);
-             // Added