Commit Graph

3 Commits

Author SHA1 Message Date
Salvatore Ingala 2961c0c589
Exclude usage of atomic types if not supported for the target
The gate is only added for Rust >= v1.60, since earlier versions don't support #[cfg(target_has_atomic = ...)]
2023-03-16 22:42:15 +01:00
Tobin C. Harding bb612fdafa
Set rustv_1_53 in build script
The rust version is supposed to be set by the build script so that users
automagically get features matching the toolchain in use. Currently we
have a feature in the manifest for `rustv_1_53` instead setting a
compiler conditional configuration option in the build script. This
causes `cargo +1.41.1 --all-features check` to fail.
2023-02-02 10:12:16 +11:00
Martin Habovstiak 1a2cf2681d Implement consensus encoding adapter for serde
In some protocols it is preferred to serialize consensus-encodable types
using consensus encoding. E.g. serialize `Transaction` as hex-encoded
string in Json in Bitcoin Core RPC protocol. This change provides
adapter to make this easier.

The adapter allows providing custom byte-to-string encoder for more
exotic cases and provides a hex implementation which should be useful in
majority of the cases.

Should help with #765
2022-12-02 10:48:05 +01:00