Merge bitcoin v0.4.0 into ppcoin
authorSunny King <p2pcoin@gmail.com>
Sat, 17 Dec 2011 16:07:07 +0000 (16:07 +0000)
committerSunny King <p2pcoin@gmail.com>
Sat, 17 Dec 2011 16:07:07 +0000 (16:07 +0000)
1  2 
src/init.cpp
src/main.cpp
src/main.h
src/makefile.unix
src/net.cpp
src/rpc.cpp
src/ui.cpp
src/util.cpp
src/wallet.cpp

diff --cc src/init.cpp
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  #include "headers.h"
diff --cc src/main.cpp
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  #include "headers.h"
@@@ -31,9 -28,9 +29,9 @@@ unsigned int nTransactionsUpdated = 0
  map<COutPoint, CInPoint> mapNextTx;
  
  map<uint256, CBlockIndex*> mapBlockIndex;
 -uint256 hashGenesisBlock("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f");
 +uint256 hashGenesisBlock("0x00000000e74ef41733382f8a94d41bf29f20c6c48a7ab489e1fab0ab719bf676");
- CBigNum bnProofOfWorkLimit(~uint256(0) >> 32);
+ static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32);
 -const int nTotalBlocksEstimate = 140700; // Conservative estimate of total nr of blocks on main chain
 +const int nTotalBlocksEstimate = 0; // Conservative estimate of total nr of blocks on main chain
  const int nInitialBlockThreshold = 120; // Regard blocks up until N-threshold as "initial download"
  CBlockIndex* pindexGenesisBlock = NULL;
  int nBestHeight = -1;
@@@ -55,8 -52,7 +53,7 @@@ int64 nHPSTimerStart
  
  // Settings
  int fGenerateBitcoins = false;
 -int64 nTransactionFee = 0;
 +int64 nTransactionFee = MIN_TX_FEE;
- CAddress addrIncoming;
  int fLimitProcessors = false;
  int nLimitProcessors = 1;
  int fMinimizeToTray = true;
diff --cc src/main.h
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  #ifndef BITCOIN_MAIN_H
@@@ -31,13 -30,15 +31,15 @@@ class CBlockIndex
  static const unsigned int MAX_BLOCK_SIZE = 1000000;
  static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
  static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 -static const int64 COIN = 100000000;
 -static const int64 CENT = 1000000;
 -static const int64 MIN_TX_FEE = 50000;
 +static const int64 COIN = 10000;
 +static const int64 CENT = 100;
 +static const int64 MIN_TX_FEE = 10000;
  static const int64 MIN_RELAY_TX_FEE = 10000;
 -static const int64 MAX_MONEY = 21000000 * COIN;
 +static const int64 MAX_MONEY = 800000000000000 * COIN;
  inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
  static const int COINBASE_MATURITY = 100;
+ // Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
+ static const int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
  #ifdef USE_UPNP
  static const int fHaveUPnP = true;
  #else
@@@ -76,14 -98,14 +99,14 @@@ obj/nogui/%.o: %.cpp $(HEADERS
  bitcoind: $(OBJS:obj/%=obj/nogui/%)
        $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
  
- obj/test/%.o: test/%.cpp $(HEADERS)
-       $(CXX) -c $(CFLAGS) -o $@ $<
+ obj/test/test_bitcoin.o: $(wildcard test/*.cpp) $(HEADERS)
+       $(CXX) -c $(CFLAGS) -o $@ test/test_bitcoin.cpp
  
- test_bitcoin: obj/test/test_bitcoin.o
-       $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
+ test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
+       $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS)
  
  clean:
 -      -rm -f bitcoin bitcoind test_bitcoin
 +      -rm -f bitcoin bitcoind test_bitcoin genesis
        -rm -f obj/*.o
        -rm -f obj/nogui/*.o
        -rm -f obj/test/*.o
diff --cc src/net.cpp
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  
diff --cc src/rpc.cpp
Simple merge
diff --cc src/ui.cpp
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  
diff --cc src/util.cpp
@@@ -1,5 -1,5 +1,6 @@@
  // Copyright (c) 2009-2010 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  #include "headers.h"
diff --cc src/wallet.cpp
@@@ -1,5 -1,5 +1,6 @@@
- // Copyright (c) 2009-2011 Satoshi Nakamoto & Bitcoin developers
 -// Copyright (c) 2009-2010 Satoshi Nakamoto
++// Copyright (c) 2009-2011 Satoshi Nakamoto
+ // Copyright (c) 2011 The Bitcoin developers
 +// Copyright (c) 2011 The PPCoin developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.