Merge branch 'master' of https://github.com/bitcoin/bitcoin
authorWladimir J. van der Laan <laanwj@gmail.com>
Fri, 2 Sep 2011 15:35:30 +0000 (17:35 +0200)
committerWladimir J. van der Laan <laanwj@gmail.com>
Fri, 2 Sep 2011 15:35:30 +0000 (17:35 +0200)
Conflicts:
src/main.cpp

1  2 
src/bitcoinrpc.cpp
src/main.cpp
src/script.cpp
src/serialize.h
src/util.cpp
src/util.h
src/wallet.cpp
src/wallet.h

Simple merge
diff --cc src/main.cpp
Simple merge
diff --cc src/script.cpp
Simple merge
diff --cc src/serialize.h
Simple merge
diff --cc src/util.cpp
Simple merge
diff --cc src/util.h
@@@ -65,16 -65,8 +65,8 @@@ typedef unsigned long long  uint64
  #endif
  
  // This is needed because the foreach macro can't get over the comma in pair<t1, t2>
 -#define PAIRTYPE(t1, t2)    pair<t1, t2>
 +#define PAIRTYPE(t1, t2)    std::pair<t1, t2>
  
- // Used to bypass the rule against non-const reference to temporary
- // where it makes sense with wrappers such as CFlatData or CTxDB
- template<typename T>
- inline T& REF(const T& val)
- {
-     return (T&)val;
- }
  // Align by increasing pointer, must have extra space at end of buffer
  template <size_t nBytes, typename T>
  T* alignup(T* p)
diff --cc src/wallet.cpp
@@@ -270,11 -268,15 +268,15 @@@ bool CWallet::AddToWallet(const CWallet
          {
              if (txout.scriptPubKey == scriptDefaultKey)
              {
-                 SetDefaultKey(GetOrReuseKeyFromPool());
-                 SetAddressBookName(CBitcoinAddress(vchDefaultKey), "");
+                 std::vector<unsigned char> newDefaultKey;
+                 if (GetKeyFromPool(newDefaultKey, false))
+                 {
+                     SetDefaultKey(newDefaultKey);
+                     SetAddressBookName(CBitcoinAddress(vchDefaultKey), "");
+                 }
              }
          }
 -
 +#endif
          // Notify UI
          vWalletUpdated.push_back(hash);
  
diff --cc src/wallet.h
Simple merge