| 1118 | /** Serialize txTo */ |
| 1119 | template<typename S> |
| 1120 | void Serialize(S &s, int nType, int nVersion) const { |
| 1121 | // Serialize nVersion |
| 1122 | ::Serialize(s, txTo.nVersion, nType, nVersion); |
| 1123 | // Serialize vin |
| 1124 | unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size(); |
| 1125 | ::WriteCompactSize(s, nInputs); |
| 1126 | for (unsigned int nInput = 0; nInput < nInputs; nInput++) |
| 1127 | SerializeInput(s, nInput, nType, nVersion); |
| 1128 | // Serialize vout |
| 1129 | unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size()); |
| 1130 | ::WriteCompactSize(s, nOutputs); |
| 1131 | for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++) |
| 1132 | SerializeOutput(s, nOutput, nType, nVersion); |
| 1133 | // Serialize nLockTime |
| 1134 | ::Serialize(s, txTo.nLockTime, nType, nVersion); |
| 1135 | } |
| 1136 | }; |
| 1137 | |
| 1138 | uint256 GetPrevoutHash(const CTransaction &txTo) { |
nothing calls this directly
no test coverage detected