Added mapSerials consensus rules to prohibit double-spending.

This commit is contained in:
Sean Bowe
2016-01-08 08:37:17 -07:00
parent 03bff15fe2
commit d66877afb3
8 changed files with 224 additions and 4 deletions

View File

@@ -93,10 +93,7 @@ bool CCoinsViewDB::GetSerial(const uint256 &serial) const {
bool spent = false;
bool read = db.Read(make_pair(DB_SERIAL, serial), spent);
// We should never read false from the database.
assert(spent != read);
return spent;
return read;
}
bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) const {