From ef2c2789f5ffe1829415cf4362ed8cac5d290e00 Mon Sep 17 00:00:00 2001 From: Jianping Wu Date: Thu, 1 Nov 2018 12:42:46 -0700 Subject: [PATCH] Marked keva namespace coin as unspendable. --- src/txdb.cpp | 2 +- src/wallet/wallet.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/txdb.cpp b/src/txdb.cpp index 614d641ca..0ce168a7b 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -339,7 +339,7 @@ bool CBlockTreeDB::WriteBatchSync(const std::vector(i->first), std::get<1>(i->first)); + std::pair name = std::make_pair(std::get<0>(i->first), std::get<1>(i->first)); batch.Write(std::make_pair(DB_NAME, name), i->second); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 83a35ece7..67f1c1a22 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2259,6 +2259,9 @@ void CWallet::AvailableCoins(std::vector &vCoins, bool fOnlySafe, const } bool fSpendableIn = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || (coinControl && coinControl->fAllowWatchOnly && (mine & ISMINE_WATCH_SOLVABLE) != ISMINE_NO); + if (CKevaScript::isKevaScript(pcoin->tx->vout[i].scriptPubKey)) { + fSpendableIn = false; + } bool fSolvableIn = (mine & (ISMINE_SPENDABLE | ISMINE_WATCH_SOLVABLE)) != ISMINE_NO; vCoins.push_back(COutput(pcoin, i, nDepth, fSpendableIn, fSolvableIn, safeTx));