-
Notifications
You must be signed in to change notification settings - Fork 406
Small Offers Fixes #2881
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
Small Offers Fixes #2881
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7755,6 +7755,8 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => { | |
.absolute_expiry(absolute_expiry) | ||
.path(path); | ||
|
||
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self); | ||
|
||
let expiration = StaleExpiration::AbsoluteTimeout(absolute_expiry); | ||
$self.pending_outbound_payments | ||
.add_new_awaiting_invoice( | ||
|
@@ -7870,6 +7872,8 @@ where | |
let invoice_request = builder.build_and_sign()?; | ||
let reply_path = self.create_blinded_path().map_err(|_| Bolt12SemanticError::MissingPaths)?; | ||
|
||
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self); | ||
|
||
let expiration = StaleExpiration::TimerTicks(1); | ||
self.pending_outbound_payments | ||
.add_new_awaiting_invoice( | ||
|
@@ -7937,6 +7941,8 @@ where | |
return Err(Bolt12SemanticError::UnsupportedChain); | ||
} | ||
|
||
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this just needs more clarification in the commit message, but why isn't this required in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I think we're okay. There's two cases where we care about the persistence-guard - (a) when we changed the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Somewhat related: I was chatting with @tnull about adding an
Seems like the options aren't that great. Any other alternatives? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think probably this? We can wake without persistence now, which IIRC will also see events. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be a bit better to put this after all the potential error paths/right before we push into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, not sure it matters much and it reads simpler here, less chance we add something and forget to move the persistence lock. |
||
|
||
match self.create_inbound_payment(Some(amount_msats), relative_expiry, None) { | ||
Ok((payment_hash, payment_secret)) => { | ||
let payment_paths = self.create_blinded_payment_paths(amount_msats, payment_secret) | ||
|
Uh oh!
There was an error while loading. Please reload this page.