-
Notifications
You must be signed in to change notification settings - Fork 123
loop: versioned MuSig2 HTLCs #546
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
Changes from all commits
a745162
476f472
e8cfe4c
52eca23
01970ad
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 |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ git: | |
| depth: false | ||
|
|
||
| go: | ||
| - "1.17.x" | ||
| - "1.19.2" | ||
|
|
||
| env: | ||
| global: | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ import ( | |
| "github.com/lightninglabs/loop/loopdb" | ||
| "github.com/lightninglabs/loop/swap" | ||
| "github.com/lightningnetwork/lnd/chainntnfs" | ||
| "github.com/lightningnetwork/lnd/channeldb" | ||
| invpkg "github.com/lightningnetwork/lnd/invoices" | ||
|
Member
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. was there a conflict with
Member
Author
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. It's just a convention that we seemed to have picked up in the LND codebase so I was just meant to conform to that. |
||
| "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc" | ||
| "github.com/lightningnetwork/lnd/lnrpc/walletrpc" | ||
| "github.com/lightningnetwork/lnd/lntypes" | ||
|
|
@@ -304,7 +304,7 @@ func awaitProbe(ctx context.Context, lnd lndclient.LndServices, | |
| select { | ||
| case update := <-updateChan: | ||
| switch update.State { | ||
| case channeldb.ContractAccepted: | ||
| case invpkg.ContractAccepted: | ||
| log.Infof("Server probe successful") | ||
| probeResult <- nil | ||
|
|
||
|
|
@@ -321,13 +321,13 @@ func awaitProbe(ctx context.Context, lnd lndclient.LndServices, | |
|
|
||
| return | ||
|
|
||
| case channeldb.ContractCanceled: | ||
| case invpkg.ContractCanceled: | ||
| probeResult <- errors.New( | ||
| "probe invoice expired") | ||
|
|
||
| return | ||
|
|
||
| case channeldb.ContractSettled: | ||
| case invpkg.ContractSettled: | ||
| probeResult <- errors.New( | ||
| "impossible that probe " + | ||
| "invoice was settled") | ||
|
|
@@ -870,7 +870,7 @@ func (s *loopInSwap) waitForSwapComplete(ctx context.Context, | |
|
|
||
| switch update.State { | ||
| // Swap invoice was paid, so update server cost balance. | ||
| case channeldb.ContractSettled: | ||
| case invpkg.ContractSettled: | ||
| s.cost.Server -= update.AmtPaid | ||
|
|
||
| // If invoice settlement and htlc spend happen | ||
|
|
@@ -891,7 +891,7 @@ func (s *loopInSwap) waitForSwapComplete(ctx context.Context, | |
|
|
||
| // Canceled invoice has no effect on server cost | ||
| // balance. | ||
| case channeldb.ContractCanceled: | ||
| case invpkg.ContractCanceled: | ||
| invoiceFinalized = true | ||
| } | ||
|
|
||
|
|
@@ -929,7 +929,7 @@ func (s *loopInSwap) processHtlcSpend(ctx context.Context, | |
| // already settled. This means that the server didn't succeed in | ||
| // sweeping the htlc after paying the invoice. | ||
| err := s.lnd.Invoices.CancelInvoice(ctx, s.hash) | ||
| if err != nil && err != channeldb.ErrInvoiceAlreadySettled { | ||
| if err != nil && err != invpkg.ErrInvoiceAlreadySettled { | ||
| return err | ||
| } | ||
| } | ||
|
|
||
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.
That will be changed to 0.16 right?
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.
Yes, once out but for now we need this to make sure that if someone runs HEAD of
loopwill also run withHEADof LND.