Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Apr 18, 2024
1 parent 9e57f96 commit 486831a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ require (
// allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display

replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240417185343-2f0c23dc4604
replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240418113032-a672b46173c4

replace github.com/lightningnetwork/lnd/tlv => github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240417185343-2f0c23dc4604
replace github.com/lightningnetwork/lnd/tlv => github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240418113032-a672b46173c4
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wl
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f h1:Pua7+5TcFEJXIIZ1I2YAUapmbcttmLj4TTi786bIi3s=
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240417185343-2f0c23dc4604 h1:vyO3OqVmcMXLaNKGc2JcGQF7l4eFflrd2kurXKig0nw=
github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240417185343-2f0c23dc4604/go.mod h1:ToghTjoz9siL1vUmS2zAQIYBdH/c9L+v79wzdfftvaU=
github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240418113032-a672b46173c4 h1:xLyca56LbkaPIpvvYUa26q/v0bPxtrXokkwjUCwAk7E=
github.com/lightningnetwork/lnd v0.17.0-beta.rc6.0.20240418113032-a672b46173c4/go.mod h1:ToghTjoz9siL1vUmS2zAQIYBdH/c9L+v79wzdfftvaU=
github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI=
github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U=
github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0=
Expand All @@ -503,8 +503,8 @@ github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQ
github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4=
github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM=
github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA=
github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240417185343-2f0c23dc4604 h1:AkQPwKoHBGMyH0lEa3SVssfgCtlCCif+GDlpgjbYotk=
github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240417185343-2f0c23dc4604/go.mod h1:g4Q94VxV1JvsRMJtzrket9zbggZ9Ad71yiADqEjw6gw=
github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240418113032-a672b46173c4 h1:zSwnOsrVedeX3UxICvrAtXTv7OGAtVDwn4hCPK6/QTg=
github.com/lightningnetwork/lnd/tlv v1.2.4-0.20240418113032-a672b46173c4/go.mod h1:g4Q94VxV1JvsRMJtzrket9zbggZ9Ad71yiADqEjw6gw=
github.com/lightningnetwork/lnd/tor v1.1.2 h1:3zv9z/EivNFaMF89v3ciBjCS7kvCj4ZFG7XvD2Qq0/k=
github.com/lightningnetwork/lnd/tor v1.1.2/go.mod h1:j7T9uJ2NLMaHwE7GiBGnpYLn4f7NRoTM6qj+ul6/ycA=
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=
Expand Down
20 changes: 10 additions & 10 deletions tapchannel/aux_funding.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (p *pendingAssetFunding) assetOutputs() []*AssetOutput {
func newCommitBlobAndLeaves(fundingState *pendingAssetFunding,
leafCreator *AuxLeafCreator, lndOpenChan *channeldb.OpenChannel,
assetOpenChan *OpenChannel, keyRing lnwallet.CommitmentKeyRing,
initiator bool) ([]byte, *lnwallet.CommitAuxLeaves, error) {
initiator bool) ([]byte, lnwallet.CommitAuxLeaves, error) {

var (
localAssets, remoteAssets []*AssetOutput
Expand Down Expand Up @@ -320,17 +320,17 @@ func newCommitBlobAndLeaves(fundingState *pendingAssetFunding,
localSatBalance, remoteSatBalance, fakeView, keyRing,
)
if err != nil {
return nil, nil, err
return nil, lnwallet.CommitAuxLeaves{}, err
}

var b bytes.Buffer
if err := firstCommit.Encode(&b); err != nil {
return nil, nil, err
return nil, lnwallet.CommitAuxLeaves{}, err
}

auxLeaves := firstCommit.Leaves()

return b.Bytes(), &auxLeaves, nil
return b.Bytes(), auxLeaves, nil
}

// toAuxFundingDesc converts the pending asset funding into a full aux funding
Expand Down Expand Up @@ -415,11 +415,11 @@ func (p *pendingAssetFunding) toAuxFundingDesc(chainParams address.ChainParams,

// Finally, we'll derive the tapscript root that'll commit to the new
// funding asset output we created above.
tapCommitment, err := commitment.FromAssets(fundingAsset)
if err != nil {
return nil, err
}
fundingDesc.TapscriptRoot = tapCommitment.TapscriptRoot(nil)
//tapCommitment, err := commitment.FromAssets(fundingAsset)

Check failure on line 418 in tapchannel/aux_funding.go

View workflow job for this annotation

GitHub Actions / Lint check

commentFormatting: put a space between `//` and comment text (gocritic)
//if err != nil {
// return nil, err
//}
//fundingDesc.TapscriptRoot = tapCommitment.TapscriptRoot(nil)

return &fundingDesc, nil
}
Expand Down Expand Up @@ -1099,7 +1099,7 @@ func (f *FundingController) chanFunder() {
// TODO(roasbeef): result type here?

fundingDesc, err := fundingFlow.toAuxFundingDesc(
f.ChainParams, req,
f.cfg.ChainParams, req,
)
if err != nil {
fErr := fmt.Errorf("unable to create aux funding "+
Expand Down

0 comments on commit 486831a

Please sign in to comment.