| 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 */ |
nothing calls this directly
no test coverage detected