Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show All 36 Lines | struct CoinEntry { | ||||
COutPoint *outpoint; | COutPoint *outpoint; | ||||
char key; | char key; | ||||
explicit CoinEntry(const COutPoint *ptr) | explicit CoinEntry(const COutPoint *ptr) | ||||
: outpoint(const_cast<COutPoint *>(ptr)), key(DB_COIN) {} | : outpoint(const_cast<COutPoint *>(ptr)), key(DB_COIN) {} | ||||
SERIALIZE_METHODS(CoinEntry, obj) { | SERIALIZE_METHODS(CoinEntry, obj) { | ||||
TxId id = obj.outpoint->GetTxId(); | TxId id = obj.outpoint->GetTxId(); | ||||
uint32_t n = obj.outpoint->GetN(); | uint32_t n = obj.outpoint->GetN(); | ||||
READWRITE(obj.key, id, n); | READWRITE(obj.key, id, VARINT(n)); | ||||
SER_READ(obj, *obj.outpoint = COutPoint(id, n)); | SER_READ(obj, *obj.outpoint = COutPoint(id, n)); | ||||
} | } | ||||
}; | }; | ||||
} // namespace | } // namespace | ||||
CCoinsViewDB::CCoinsViewDB(fs::path ldb_path, size_t nCacheSize, bool fMemory, | CCoinsViewDB::CCoinsViewDB(fs::path ldb_path, size_t nCacheSize, bool fMemory, | ||||
bool fWipe) | bool fWipe) | ||||
: db(ldb_path, nCacheSize, fMemory, fWipe, true) {} | : db(ldb_path, nCacheSize, fMemory, fWipe, true) {} | ||||
▲ Show 20 Lines • Show All 503 Lines • Show Last 20 Lines |