![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2014, 09:15:00 PM |
|
The transaction serialization contains various var_int fields. This means that you can change those and keep the actual data in the transaction the same.
For example, a transaction with 3 inputs could encode the 3 as "03" to encode 3 (single byte version) or "FD0300" (two byte version).
Is it defined as the most compact version? This isn't transaction malleability exactly.
The process when a tx is received is
- tx received - convert to CTransaction object - store 3 in the size of the vector - calls UpdateHash -- re-serializes transaction -- compute hash - store hash
This means that no matter how the transaction receives the 3, the 3 gets converted back into the shortest form before hashing for the txid.
Is this correct?
|