Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show All 29 Lines | |||||
static const char DB_REINDEX_FLAG = 'R'; | static const char DB_REINDEX_FLAG = 'R'; | ||||
static const char DB_LAST_BLOCK = 'l'; | static const char DB_LAST_BLOCK = 'l'; | ||||
namespace { | namespace { | ||||
struct CoinEntry { | struct CoinEntry { | ||||
COutPoint *outpoint; | COutPoint *outpoint; | ||||
char key; | char key; | ||||
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) {} | ||||
template <typename Stream> void Serialize(Stream &s) const { | template <typename Stream> void Serialize(Stream &s) const { | ||||
s << key; | s << key; | ||||
s << outpoint->GetTxId(); | s << outpoint->GetTxId(); | ||||
s << VARINT(outpoint->GetN()); | s << VARINT(outpoint->GetN()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 411 Lines • Show Last 20 Lines |