Fix -Wstring-plus-int warning on clang
This commit is contained in:
parent
23f8b30c88
commit
1f9dfbb9f0
|
@ -143,7 +143,7 @@ bool CCoinsViewCache::GetNullifier(const uint256 &nullifier, NullifierType type)
|
||||||
cacheToUse = &cacheSaplingNullifiers;
|
cacheToUse = &cacheSaplingNullifiers;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw std::runtime_error("Unknown nullifier type " + type);
|
throw std::runtime_error("Unknown nullifier type");
|
||||||
}
|
}
|
||||||
CNullifiersMap::iterator it = cacheToUse->find(nullifier);
|
CNullifiersMap::iterator it = cacheToUse->find(nullifier);
|
||||||
if (it != cacheToUse->end())
|
if (it != cacheToUse->end())
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
mapToUse = &mapSaplingNullifiers_;
|
mapToUse = &mapSaplingNullifiers_;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw std::runtime_error("Unknown nullifier type " + type);
|
throw std::runtime_error("Unknown nullifier type");
|
||||||
}
|
}
|
||||||
std::map<uint256, bool>::const_iterator it = mapToUse->find(nf);
|
std::map<uint256, bool>::const_iterator it = mapToUse->find(nf);
|
||||||
if (it == mapToUse->end()) {
|
if (it == mapToUse->end()) {
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool CCoinsViewDB::GetNullifier(const uint256 &nf, NullifierType type) const {
|
||||||
dbChar = DB_SAPLING_NULLIFIER;
|
dbChar = DB_SAPLING_NULLIFIER;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw runtime_error("Unknown nullifier type " + type);
|
throw runtime_error("Unknown nullifier type");
|
||||||
}
|
}
|
||||||
return db.Read(make_pair(dbChar, nf), spent);
|
return db.Read(make_pair(dbChar, nf), spent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,7 +470,7 @@ void CTxMemPool::checkNullifiers(NullifierType type) const
|
||||||
mapToUse = &mapSaplingNullifiers;
|
mapToUse = &mapSaplingNullifiers;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw runtime_error("Unknown nullifier type " + type);
|
throw runtime_error("Unknown nullifier type");
|
||||||
}
|
}
|
||||||
for (const auto& entry : *mapToUse) {
|
for (const auto& entry : *mapToUse) {
|
||||||
uint256 hash = entry.second->GetHash();
|
uint256 hash = entry.second->GetHash();
|
||||||
|
@ -590,7 +590,7 @@ bool CTxMemPool::nullifierExists(const uint256& nullifier, NullifierType type) c
|
||||||
case SAPLING_NULLIFIER:
|
case SAPLING_NULLIFIER:
|
||||||
return mapSaplingNullifiers.count(nullifier);
|
return mapSaplingNullifiers.count(nullifier);
|
||||||
default:
|
default:
|
||||||
throw runtime_error("Unknown nullifier type " + type);
|
throw runtime_error("Unknown nullifier type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue