Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer Storage Feature – Part 2 #3623

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: Add OurPeerStorage for serialized Peer Storage backups
adi2011 committed Mar 14, 2025
commit c8d181f4a8f4deea0c841cffd52898c471474f0d
3 changes: 2 additions & 1 deletion lightning/src/ln/our_peer_storage.rs
Original file line number Diff line number Diff line change
@@ -35,7 +35,8 @@ use crate::prelude::*;
/// ## Example
/// ```
/// use lightning::ln::our_peer_storage::OurPeerStorage;
/// let key = [0u8; 32];
/// use lightning::chain::chainmonitor::PeerStorageKey;
/// let key = PeerStorageKey::new([0u8; 32]);
/// let our_peer_storage = OurPeerStorage::create_from_data(key.clone(), vec![1,2,3]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Add whitespaces after ,s in vec!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem so?

/// let decrypted_data = our_peer_storage.decrypt_our_peer_storage(key).unwrap();
/// assert_eq!(decrypted_data, vec![1 , 2, 3]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Stray whitespace after 1.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem fixed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really sorry, I did not include this in the fixup.