| 1336 | /** Serialize txTo */ |
| 1337 | template<typename S> |
| 1338 | void Serialize(S &s) const { |
| 1339 | // Serialize version |
| 1340 | ::Serialize(s, txTo.version); |
| 1341 | // Serialize vin |
| 1342 | unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size(); |
| 1343 | ::WriteCompactSize(s, nInputs); |
| 1344 | for (unsigned int nInput = 0; nInput < nInputs; nInput++) |
| 1345 | SerializeInput(s, nInput); |
| 1346 | // Serialize vout |
| 1347 | unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size()); |
| 1348 | ::WriteCompactSize(s, nOutputs); |
| 1349 | for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++) |
| 1350 | SerializeOutput(s, nOutput); |
| 1351 | // Serialize nLockTime |
| 1352 | ::Serialize(s, txTo.nLockTime); |
| 1353 | } |
| 1354 | }; |
| 1355 | |
| 1356 | /** Compute the (single) SHA256 of the concatenation of all prevouts of a tx. */ |
nothing calls this directly
no test coverage detected