Skip to content

Commit 7a4deac

Browse files
committed
f from_impl
1 parent ab49a0e commit 7a4deac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
968968
/// For lockorder enforcement purposes, we need to have a single site which constructs the
969969
/// `inner` mutex, otherwise cases where we lock two monitors at the same time (eg in our
970970
/// PartialEq implementation) we may decide a lockorder violation has occurred.
971-
fn construct_monitor(imp: ChannelMonitorImpl<Signer>) -> Self {
971+
fn from_impl(imp: ChannelMonitorImpl<Signer>) -> Self {
972972
ChannelMonitor { inner: Mutex::new(imp) }
973973
}
974974

@@ -1019,7 +1019,7 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
10191019
let mut outputs_to_watch = HashMap::new();
10201020
outputs_to_watch.insert(funding_info.0.txid, vec![(funding_info.0.index as u32, funding_info.1.clone())]);
10211021

1022-
Self::construct_monitor(ChannelMonitorImpl {
1022+
Self::from_impl(ChannelMonitorImpl {
10231023
latest_update_id: 0,
10241024
commitment_transaction_number_obscure_factor,
10251025

@@ -3366,7 +3366,7 @@ impl<'a, Signer: Sign, K: KeysInterface<Signer = Signer>> ReadableArgs<&'a K>
33663366
let mut secp_ctx = Secp256k1::new();
33673367
secp_ctx.seeded_randomize(&keys_manager.get_secure_random_bytes());
33683368

3369-
Ok((best_block.block_hash(), ChannelMonitor::construct_monitor(ChannelMonitorImpl {
3369+
Ok((best_block.block_hash(), ChannelMonitor::from_impl(ChannelMonitorImpl {
33703370
latest_update_id,
33713371
commitment_transaction_number_obscure_factor,
33723372

0 commit comments

Comments
 (0)