Build sanity checks
[novacoin.git] / src / wallet.cpp
index c02b6bb..83cc274 100644 (file)
@@ -3,11 +3,11 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "txdb.h"
+#include "txdb-leveldb.h"
 #include "wallet.h"
 #include "walletdb.h"
 #include "crypter.h"
-#include "ui_interface.h"
+#include "interface.h"
 #include "base58.h"
 #include "kernel.h"
 #include "coincontrol.h"
@@ -526,19 +526,6 @@ bool CWallet::DecryptWallet(const SecureString& strWalletPassphrase)
     return true;
 }
 
-bool CWallet::GetPEM(const CKeyID &keyID, const std::string &fileName, const SecureString &strPassKey) const
-{
-    BIO *pemOut = BIO_new_file(fileName.c_str(), "w");
-    if (pemOut == NULL)
-        return error("GetPEM() : failed to create file %s\n", fileName.c_str());
-    CKey key;
-    if (!GetKey(keyID, key))
-        return error("GetPEM() : failed to get key for address=%s\n", CBitcoinAddress(keyID).ToString().c_str());
-    bool result = key.WritePEM(pemOut, strPassKey);
-    BIO_free(pemOut);
-    return result;
-}
-
 int64_t CWallet::IncOrderPosNext(CWalletDB *pwalletdb)
 {
     int64_t nRet = nOrderPosNext++;
@@ -2234,7 +2221,7 @@ bool CWallet::MergeCoins(const int64_t& nAmount, const int64_t& nMinValue, const
     if (wtxNew.vout[0].nValue > 0) {
         int64_t nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION) + wtxNew.vin.size() * 110;
 
-        double dFinalPriority = dWeight /= nBytes;
+        double dFinalPriority = dWeight / nBytes;
         bool fAllowFree = CTransaction::AllowFree(dFinalPriority);
 
         // Get actual transaction fee according to its size and priority