Skip to content

Commit 3691e8f

Browse files
Update API for writeable async offer cache to be bytes
The previous API wouldn't work for language bindings.
1 parent e787740 commit 3691e8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ use crate::util::logger::{Level, Logger, WithContext};
130130
use crate::util::scid_utils::fake_scid;
131131
use crate::util::ser::{
132132
BigSize, FixedLengthReader, LengthReadable, MaybeReadable, Readable, ReadableArgs, VecWriter,
133-
Writeable, Writer,
133+
WithoutLength, Writeable, Writer,
134134
};
135135
use crate::util::wakers::{Future, Notifier};
136136

@@ -15248,7 +15248,7 @@ where
1524815248
(15, self.inbound_payment_id_secret, required),
1524915249
(17, in_flight_monitor_updates, option),
1525015250
(19, peer_storage_dir, optional_vec),
15251-
(21, self.flow.writeable_async_receive_offer_cache(), required),
15251+
(21, WithoutLength(&self.flow.writeable_async_receive_offer_cache()), required),
1525215252
});
1525315253

1525415254
Ok(())

lightning/src/offers/flow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,8 +1657,8 @@ where
16571657
cache.static_invoice_persisted(context, self.duration_since_epoch())
16581658
}
16591659

1660-
/// Get the [`AsyncReceiveOfferCache`] for persistence.
1661-
pub fn writeable_async_receive_offer_cache(&self) -> impl Writeable + '_ {
1660+
/// Get the encoded [`AsyncReceiveOfferCache`] for persistence.
1661+
pub fn writeable_async_receive_offer_cache(&self) -> Vec<u8> {
16621662
self.async_receive_offer_cache.encode()
16631663
}
16641664
}

0 commit comments

Comments
 (0)