-
Notifications
You must be signed in to change notification settings - Fork 417
Peer Storage (Part 3): Identifying Lost Channel States #3897
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
Open
adi2011
wants to merge
9
commits into
lightningdevkit:main
Choose a base branch
from
adi2011:peer-storage/serialise-deserialise
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+436
−235
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
65b5e2b
Write structs to serialise-deserialise Channels inside Peer-storage
adi2011 28d7874
Remove #[rustfmt::skip] from fn write
adi2011 341fe0a
Serialise ChannelMonitors and send them over inside Peer Storage
adi2011 2b3fdb9
Determine if we have lost data
adi2011 662fff1
test: Modify test_peer_storage to check latest changes
adi2011 8a05784
fixup: Allow unused_import, these are used in cfg(peer_storage)
adi2011 e1f702f
fixup: Serialise ChannelMonitors and send them over inside Peer Storage
adi2011 6328b33
fixup: test: Modify test_peer_storage to check latest changes
adi2011 b2cbe73
fixup: Serialise ChannelMonitors and send them over inside Peer Storage
adi2011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,5 @@ check-cfg = [ | |
"cfg(splicing)", | ||
"cfg(async_payments)", | ||
"cfg(simple_close)", | ||
"cfg(peer_storage)", | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll also need to introduce the
cfg
-gate in a few other places to get rid of the warning, e.g., above forall_counterparty_node_ids
and on some imports.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I also cfg-gate
entropy_source
insideChainMonitor
?If yes, I would have to cfg-gate a lot of things in other files as well...
I think, It would be better to
allow unused
on it, since we are going to remove the peer-storage cfg gate in the next PR...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we need to add the cfg-gate where ever we'll get a warning. I'd prefer to avoid
allow_unused
, especially as it might easily slip through (i.e., we might not remember to remove it again going forward), while for thecfg
guard we will be forced to make the cleanup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so I have cfg-gated at almost all the places in the chainmonitor monitor, but I have decided to add
PhantomData
in ChainMonitor, to avoid redeclaring the whole struct or thenew
function.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned elsewhere, it should be fine to just rename the entropy source
_entropy_source
for now, no need forPhantomData
then.