We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b886529 commit b194c1dCopy full SHA for b194c1d
lightning-invoice/src/payment.rs
@@ -752,6 +752,19 @@ impl InFlightHtlcs {
752
}
753
754
755
+#[cfg(not(feature = "no-std"))]
756
+impl lightning::util::ser::Writeable for InFlightHtlcs {
757
+ fn write<W: lightning::util::ser::Writer>(&self, writer: &mut W) -> Result<(), std::io::Error> { self.0.write(writer) }
758
+}
759
+
760
761
+impl lightning::util::ser::Readable for InFlightHtlcs {
762
+ fn read<R: lightning::io::Read>(reader: &mut R) -> Result<Self, lightning::ln::msgs::DecodeError> {
763
+ let infight_map: HashMap<(u64, bool), u64> = lightning::util::ser::Readable::read(reader)?;
764
+ Ok(Self(infight_map))
765
+ }
766
767
768
#[cfg(test)]
769
mod tests {
770
use super::*;
0 commit comments