Changeset View
Changeset View
Standalone View
Standalone View
src/undo.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | template <typename Stream> void Unserialize(Stream &s) { | ||||
uint32_t nCode = 0; | uint32_t nCode = 0; | ||||
::Unserialize(s, VARINT(nCode)); | ::Unserialize(s, VARINT(nCode)); | ||||
uint32_t nHeight = nCode / 2; | uint32_t nHeight = nCode / 2; | ||||
bool fCoinBase = nCode & 1; | bool fCoinBase = nCode & 1; | ||||
if (nHeight > 0) { | if (nHeight > 0) { | ||||
// Old versions stored the version number for the last spend of a | // Old versions stored the version number for the last spend of a | ||||
// transaction's outputs. Non-final spends were indicated with | // transaction's outputs. Non-final spends were indicated with | ||||
// height = 0. | // height = 0. | ||||
int nVersionDummy; | unsigned int nVersionDummy; | ||||
::Unserialize(s, VARINT(nVersionDummy)); | ::Unserialize(s, VARINT(nVersionDummy)); | ||||
} | } | ||||
CTxOut txout; | CTxOut txout; | ||||
::Unserialize(s, CTxOutCompressor(REF(txout))); | ::Unserialize(s, CTxOutCompressor(REF(txout))); | ||||
*pcoin = Coin(std::move(txout), nHeight, fCoinBase); | *pcoin = Coin(std::move(txout), nHeight, fCoinBase); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |