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

Method Serialize

src/wallet/transaction.h:223–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222 template<typename Stream>
223 void Serialize(Stream& s) const
224 {
225 mapValue_t mapValueCopy = mapValue;
226
227 mapValueCopy["fromaccount"] = "";
228 if (nOrderPos != -1) {
229 mapValueCopy["n"] = ToString(nOrderPos);
230 }
231 if (nTimeSmart) {
232 mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart);
233 }
234
235 std::vector<uint8_t> dummy_vector1; //!< Used to be vMerkleBranch
236 std::vector<uint8_t> dummy_vector2; //!< Used to be vtxPrev
237 bool dummy_bool = false; //!< Used to be fSpent
238 uint256 serializedHash = TxStateSerializedBlockHash(m_state);
239 int serializedIndex = TxStateSerializedIndex(m_state);
240 s << tx << serializedHash << dummy_vector1 << serializedIndex << dummy_vector2 << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << fFromMe << dummy_bool;
241 }
242
243 template<typename Stream>
244 void Unserialize(Stream& s)

Callers

nothing calls this directly

Calls 3

TxStateSerializedIndexFunction · 0.85
ToStringFunction · 0.50

Tested by

no test coverage detected