From: Wladimir J. van der Laan Date: Fri, 2 Sep 2011 15:35:30 +0000 (+0200) Subject: Merge branch 'master' of https://github.com/bitcoin/bitcoin X-Git-Tag: v0.4.0-unstable~226^2~57^2~42 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=7a15d4ff67c9a6e3b6b5a63f82f76ffe1937c3b8 Merge branch 'master' of https://github.com/bitcoin/bitcoin Conflicts: src/main.cpp --- 7a15d4ff67c9a6e3b6b5a63f82f76ffe1937c3b8 diff --cc src/util.h index 7fd224c,3d7ef10..fabcaf9 --- a/src/util.h +++ b/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 -#define PAIRTYPE(t1, t2) pair +#define PAIRTYPE(t1, t2) std::pair - // Used to bypass the rule against non-const reference to temporary - // where it makes sense with wrappers such as CFlatData or CTxDB - template - inline T& REF(const T& val) - { - return (T&)val; - } - // Align by increasing pointer, must have extra space at end of buffer template T* alignup(T* p) diff --cc src/wallet.cpp index 076a9f8,8bbb80c..9c04e37 --- a/src/wallet.cpp +++ b/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 newDefaultKey; + if (GetKeyFromPool(newDefaultKey, false)) + { + SetDefaultKey(newDefaultKey); + SetAddressBookName(CBitcoinAddress(vchDefaultKey), ""); + } } } - +#endif // Notify UI vWalletUpdated.push_back(hash);