MCPcopy Create free account
hub / github.com/ElementsProject/elements / Unser

Method Unser

src/undo.h:36–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35 template<typename Stream>
36 void Unser(Stream &s, Coin& txout) {
37 uint32_t nCode = 0;
38 ::Unserialize(s, VARINT(nCode));
39 txout.nHeight = nCode >> 1;
40 txout.fCoinBase = nCode & 1;
41 if (txout.nHeight > 0) {
42 // Old versions stored the version number for the last spend of
43 // a transaction's outputs. Non-final spends were indicated with
44 // height = 0.
45 unsigned int nVersionDummy;
46 ::Unserialize(s, VARINT(nVersionDummy));
47 }
48 ::Unserialize(s, Using<TxOutCompression>(txout.out));
49 }
50};
51
52/** Undo information for a CTransaction */

Callers

nothing calls this directly

Calls 1

UnserializeFunction · 0.85

Tested by

no test coverage detected