rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Re-export bitcoin crate

Open toxeus opened this issue 1 year ago • 0 comments

For the same reason the bitcoin crate is re-exporting the secp256k1 crate the lightning crate should re-export the bitcoin crate: to ease the burden on calling code to maintain compatible bitcoin versions.

The lightning crate makes heavy use of types defined in (or re-exported by) the bitcoin crate. Compilation will fail if e.g. comparisons or match expressions are done with types from bitcoin crate versions with a non-equal minor version. This forces calling code to depend on a bitcoin crate with a compatible version. This becomes a maintenance nightmare once two or more crates, that use bitcoin types in their public API, are used in calling code simultaneously.

toxeus avatar May 17 '24 14:05 toxeus