MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Serialize

Method Serialize

src/script/interpreter.cpp:1199–1214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197 /** Serialize txTo */
1198 template<typename S>
1199 void Serialize(S &s) const {
1200 // Serialize nVersion
1201 ::Serialize(s, txTo.nVersion);
1202 // Serialize vin
1203 unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size();
1204 ::WriteCompactSize(s, nInputs);
1205 for (unsigned int nInput = 0; nInput < nInputs; nInput++)
1206 SerializeInput(s, nInput);
1207 // Serialize vout
1208 unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size());
1209 ::WriteCompactSize(s, nOutputs);
1210 for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
1211 SerializeOutput(s, nOutput);
1212 // Serialize nLockTime
1213 ::Serialize(s, txTo.nLockTime);
1214 }
1215};
1216
1217template <class T>

Callers

nothing calls this directly

Calls 3

WriteCompactSizeFunction · 0.85
SerializeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected