Marked keva namespace coin as unspendable.

This commit is contained in:
Jianping Wu 2018-11-01 12:42:46 -07:00
parent 252319e899
commit 59e48a4588
2 changed files with 4 additions and 1 deletions

View File

@ -339,7 +339,7 @@ bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockF
void CKevaCache::writeBatch (CDBBatch& batch) const
{
for (EntryMap::const_iterator i = entries.begin(); i != entries.end(); ++i) {
auto name = std::make_pair(std::get<0>(i->first), std::get<1>(i->first));
std::pair<valtype, valtype> name = std::make_pair(std::get<0>(i->first), std::get<1>(i->first));
batch.Write(std::make_pair(DB_NAME, name), i->second);
}

View File

@ -2259,6 +2259,9 @@ void CWallet::AvailableCoins(std::vector<COutput> &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));