Skip to content

Commit ac4ec16

Browse files
TheBlueMattadi2011
authored andcommitted
Pass UpdateFulfillHTLC message owned, rather than by ref
Most of the message handlers in LDK pass messages to the handler by reference. This is unnecessarily inefficient and there's no real reason to do so. Because we just tweaked what `UpdateFulfillHTLC` messages look like, this is a good opportunity to make progress here, passing at least one message owned rather than by reference.
1 parent ff279d6 commit ac4ec16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13521,7 +13521,7 @@ where
1352113521
&self, counterparty_node_id: PublicKey, msg: msgs::UpdateFulfillHTLC,
1352213522
) {
1352313523
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
13524-
let res = self.internal_update_fulfill_htlc(&counterparty_node_id, msg);
13524+
let res = self.internal_update_fulfill_htlc(&counterparty_node_id, &msg);
1352513525
let _ = handle_error!(self, res, counterparty_node_id);
1352613526
}
1352713527

0 commit comments

Comments
 (0)