Rename DB_ANCHOR to DB_SPROUT_ANCHOR.

This commit is contained in:
Sean Bowe 2018-04-27 14:34:31 -06:00
parent 30325eebf5
commit 8b8d70cad9
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
using namespace std; using namespace std;
static const char DB_ANCHOR = 'A'; static const char DB_SPROUT_ANCHOR = 'A';
static const char DB_NULLIFIER = 's'; static const char DB_NULLIFIER = 's';
static const char DB_SAPLING_NULLIFIER = 'S'; static const char DB_SAPLING_NULLIFIER = 'S';
static const char DB_COINS = 'c'; static const char DB_COINS = 'c';
@ -47,7 +47,7 @@ bool CCoinsViewDB::GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree)
return true; return true;
} }
bool read = db.Read(make_pair(DB_ANCHOR, rt), tree); bool read = db.Read(make_pair(DB_SPROUT_ANCHOR, rt), tree);
return read; return read;
} }
@ -130,9 +130,9 @@ bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins,
for (CAnchorsSproutMap::iterator it = mapSproutAnchors.begin(); it != mapSproutAnchors.end();) { for (CAnchorsSproutMap::iterator it = mapSproutAnchors.begin(); it != mapSproutAnchors.end();) {
if (it->second.flags & CAnchorsSproutCacheEntry::DIRTY) { if (it->second.flags & CAnchorsSproutCacheEntry::DIRTY) {
if (!it->second.entered) if (!it->second.entered)
batch.Erase(make_pair(DB_ANCHOR, it->first)); batch.Erase(make_pair(DB_SPROUT_ANCHOR, it->first));
else { else {
batch.Write(make_pair(DB_ANCHOR, it->first), it->second.tree); batch.Write(make_pair(DB_SPROUT_ANCHOR, it->first), it->second.tree);
} }
// TODO: changed++? // TODO: changed++?
} }