In order that we can safely change/maintain de/serialization code we need to have regression tests with hard coded serializations for each type that implements serde. It is enough to test a single serde data format, use JSON for `opcodes` and bincode for other types. Do regression testing in a newly added `tests` module. |
||
|---|---|---|
| .. | ||
| README.md | ||
| absolute_lock_time_blocks_bincode | ||
| absolute_lock_time_seconds_bincode | ||
| address_bincode | ||
| block_bincode | ||
| child_number_bincode | ||
| control_block_bincode | ||
| control_block_hex | ||
| ecdsa_sig_bincode | ||
| ecdsa_sig_hex | ||
| extended_priv_key | ||
| extended_priv_key_bincode | ||
| extended_pub_key | ||
| extended_pub_key_bincode | ||
| private_key_bincode | ||
| proprietary_key_bincode | ||
| psbt_bincode | ||
| public_key_bincode | ||
| public_key_hex | ||
| raw_pair_bincode | ||
| relative_lock_time_blocks_bincode | ||
| relative_lock_time_seconds_bincode | ||
| schnorr_sig_bincode | ||
| schnorr_sig_hex | ||
| script_bincode | ||
| taproot_builder_bincode | ||
| taproot_spend_info_bincode | ||
| transaction_bincode | ||
| transaction_ser | ||
| txin_bincode | ||
| txin_ser | ||
| txout_bincode | ||
| u256_bincode | ||
| uint128_bincode | ||
| uint256_bincode | ||
| witness_bincode | ||
README.md
Serialization input/output
Files here contain hex strings and binary data representing types used for regression testing.
- *_hex: consensus encoded types represented as hex strings
- *_ser: consensus encoded types represented as binary data
- *_bincode: types serialized with serde as bincode
We consensus deserialize, serde serialize, then check against the expected data to verify no serde regressions have been introduced.