Commit Graph

5 Commits

Author SHA1 Message Date
Tobin C. Harding 022730bd8d Add a workspace to the top level directory.
Create a directory `bitcoin` and move into it the following as is with
no code changes:

- src
- Cargo.toml
- contrib
- test_data
- examples

Then do:

- Add a workspace to the repository root directory.
- Add the newly created `bitcoin` crate to the workspace.
- Exclude `fuzz` and `embedded` crates from the workspace.
- Add a contrib/test.sh script that runs contrib/test.sh in each
  sub-crate
- Fix the bitcoin/contrib/test.sh script
2022-09-13 08:44:57 +10:00
Tobin C. Harding a8f9e8ad96 Add serde roundtrip tests
We have a TODO in the code to add serde roundtrip unit tests, seems
reasonable so do it and remove the TODO.
2022-09-01 16:08:12 +10:00
Martin Habovstiak 43827a1e1c Hex macro clean up
There were some duplicated hex macros in the `address` module as well as
several macros outputing specific types instead of working with any type
deserializable from hex.

This cleanup moves the macros and deduplicates them, introduces a new
`TestFromHex` trait to generalize parsing hex and rewrites the code to
use hex parsing generally. `hex_script` is still kept because its usage
is very frequent.
2022-08-30 15:04:31 +02:00
Tobin C. Harding 22fd107e16 Run rustfmt
We just moved the `address` module out of `util` which is currently
ignored by `rustfmt`.

Run `rustfmt`, no other changes other than those made by the tool.
2022-08-12 07:35:15 +10:00
Tobin C. Harding e1ae9d86bb Move the address module out of util
The identifier 'util' does not convey any information. We have a whole
bunch of modules inside the `util` module.

As part of work to reduce the amount of arbitrary things in the `util`
module move the `address` module to the crate root level.
2022-08-12 07:35:15 +10:00
Renamed from src/util/address.rs (Browse further)