]> git.bitcoin.ninja Git - rust-lightning/commit
Move `[u8; 32]` wrapper types to a common module
authorMatt Corallo <git@bluematt.me>
Wed, 1 May 2024 15:49:59 +0000 (15:49 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 1 May 2024 19:01:40 +0000 (19:01 +0000)
commite818c4b13fcfc125dd3f3f1e86b49ddf299a85b4
tree00aa464b18547140f37ffc17e5515387ac5b7e1d
parent8084cec3e48e137060f8b57ca46029e86de46383
Move `[u8; 32]` wrapper types to a common module

The `PaymentHash`, `PaymentSecret`, `PaymentPreimage`, and
`ChannelId` types are all small wrappers around `[u8; 32]` and are
used throughout the codebase but were defined in the top-level
`ln/mod.rs` file and the relatively sparsely-populated
`ln/channel_id.rs` file.

Here we move them to a common `types` module and go ahead and
update all our in-crate `use` statements to refer to the new
module for bindings. We do, however, leave a `pub use` alias for
the old paths to avoid upgrade hassle for users.
53 files changed:
lightning-background-processor/src/lib.rs
lightning-invoice/src/de.rs
lightning-invoice/src/lib.rs
lightning-invoice/src/payment.rs
lightning-invoice/src/utils.rs
lightning/src/blinded_path/payment.rs
lightning/src/chain/chainmonitor.rs
lightning/src/chain/channelmonitor.rs
lightning/src/chain/mod.rs
lightning/src/chain/onchaintx.rs
lightning/src/chain/package.rs
lightning/src/chain/transaction.rs
lightning/src/events/bump_transaction.rs
lightning/src/events/mod.rs
lightning/src/ln/blinded_payment_tests.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channel_id.rs [deleted file]
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/inbound_payment.rs
lightning/src/ln/interactivetxs.rs
lightning/src/ln/mod.rs
lightning/src/ln/monitor_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/onion_payment.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/onion_utils.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/reorg_tests.rs
lightning/src/ln/shutdown_tests.rs
lightning/src/ln/types.rs [new file with mode: 0644]
lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/refund.rs
lightning/src/offers/test_utils.rs
lightning/src/routing/gossip.rs
lightning/src/routing/router.rs
lightning/src/sign/ecdsa.rs
lightning/src/sign/mod.rs
lightning/src/util/logger.rs
lightning/src/util/macro_logger.rs
lightning/src/util/ser.rs
lightning/src/util/sweep.rs
lightning/src/util/test_channel_signer.rs
lightning/src/util/test_utils.rs
rustfmt_excluded_files