Browse Source

Fixed windows build.

Fixed qt build.
cn
Jianping Wu 6 years ago committed by Jianping Wu
parent
commit
e3a786f827
  1. 3
      src/qt/walletmodel.cpp
  2. 5
      src/script/keva.cpp
  3. 4
      src/wallet/wallet.cpp

3
src/qt/walletmodel.cpp

@ -276,7 +276,8 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
CWalletTx *newTx = transaction.getTransaction(); CWalletTx *newTx = transaction.getTransaction();
CReserveKey *keyChange = transaction.getPossibleKeyChange(); CReserveKey *keyChange = transaction.getPossibleKeyChange();
bool fCreated = wallet->CreateTransaction(vecSend, *newTx, *keyChange, nFeeRequired, nChangePosRet, strFailReason, coinControl); std::vector<unsigned char> empty;
bool fCreated = wallet->CreateTransaction(vecSend, nullptr, empty, *newTx, *keyChange, nFeeRequired, nChangePosRet, strFailReason, coinControl);
transaction.setTransactionFee(nFeeRequired); transaction.setTransactionFee(nFeeRequired);
if (fSubtractFeeFromAmount && fCreated) if (fSubtractFeeFromAmount && fCreated)
transaction.reassignAmounts(nChangePosRet); transaction.reassignAmounts(nChangePosRet);

5
src/script/keva.cpp

@ -2,9 +2,12 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2018 The Kevacoin Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <script/keva.h> #include <script/keva.h>
#include <hash.h> #include <hash.h>
#include "base58.h"
const std::string CKevaScript::KEVA_DISPLAY_NAME_KEY = "_KEVA_NS_"; const std::string CKevaScript::KEVA_DISPLAY_NAME_KEY = "_KEVA_NS_";

4
src/wallet/wallet.cpp

@ -2711,7 +2711,7 @@ OutputType CWallet::TransactionChangeType(OutputType change_type, const std::vec
bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend,
const CTxIn* withInput, const CTxIn* withInput,
std::vector<unsigned char>& kaveNamespace, std::vector<unsigned char>& kevaNamespace,
CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet,
int& nChangePosInOut, std::string& strFailReason, const CCoinControl& coin_control, bool sign) int& nChangePosInOut, std::string& strFailReason, const CCoinControl& coin_control, bool sign)
{ {
@ -2951,7 +2951,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend,
CScript dummyScript = iter->scriptPubKey; CScript dummyScript = iter->scriptPubKey;
CKevaScript kevaOp(dummyScript); CKevaScript kevaOp(dummyScript);
if (kevaOp.isKevaOp() && kevaOp.isNamespaceRegistration()) { if (kevaOp.isKevaOp() && kevaOp.isNamespaceRegistration()) {
iter->scriptPubKey = CKevaScript::replaceKevaNamespace(dummyScript, coin.outpoint.hash, kaveNamespace, Params()); iter->scriptPubKey = CKevaScript::replaceKevaNamespace(dummyScript, coin.outpoint.hash, kevaNamespace, Params());
kevaDummyReplaced = true; kevaDummyReplaced = true;
break; break;
} }

Loading…
Cancel
Save