MCPcopy Create free account
hub / github.com/LUX-Core/lux / Serialize

Method Serialize

src/script/interpreter.cpp:1165–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1163 /** Serialize txTo */
1164 template<typename S>
1165 void Serialize(S &s, int nType, int nVersion) const {
1166 // Serialize nVersion
1167 ::Serialize(s, txTo.nVersion, nType, nVersion);
1168 ::Serialize(s, txTo.nTime, nType, nVersion);
1169 // Serialize vin
1170 unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size();
1171 ::WriteCompactSize(s, nInputs);
1172 for (unsigned int nInput = 0; nInput < nInputs; nInput++)
1173 SerializeInput(s, nInput, nType, nVersion);
1174 // Serialize vout
1175 unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size());
1176 ::WriteCompactSize(s, nOutputs);
1177 for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
1178 SerializeOutput(s, nOutput, nType, nVersion);
1179 // Serialize nLockTime
1180 ::Serialize(s, txTo.nLockTime, nType, nVersion);
1181 }
1182};
1183
1184uint256 GetPrevoutHash(const CTransaction& txTo) {

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 3

WriteCompactSizeFunction · 0.85
SerializeFunction · 0.50
sizeMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36