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

RFQ cleanup #1124

Merged
merged 3 commits into from
Sep 17, 2024
Merged

RFQ cleanup #1124

merged 3 commits into from
Sep 17, 2024

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Sep 16, 2024

Non-breaking cleanup commits for the RFQ packages.

guggero and others added 3 commits September 16, 2024 16:21
We only want a single place where SCIDs are calculated from the RFQ ID.
This is especially important due to a future change required where lnd
will only accept SCIDs in a certain range and we'll need to
deterministically shift the derived SCID to be within that range.
Eliminating these error types ensures that all current errors align with
those documented in the BLIP.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10887430285

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 11 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.04%) to 40.414%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rfqmsg/sell_accept.go 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
asset/mock.go 2 92.46%
asset/asset.go 2 81.8%
commitment/tap.go 3 84.17%
tapgarden/caretaker.go 4 68.87%
Totals Coverage Status
Change from base Build 10887264846: 0.04%
Covered Lines: 24222
Relevant Lines: 59934

💛 - Coveralls

Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

Lgtm


scidInteger := binary.BigEndian.Uint64(scidBytes)
return SerialisedScid(scidInteger)
return q.ID.Scid()
Copy link
Member

Choose a reason for hiding this comment

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

note for commit message:

This code should be relevant for generating RFQ scids within range: lnd/aliasmgr/aliasmgr.go

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I have that code in a WIP branch (lnd-0-19-staging-rebased already:

minBlock := uint32(aliasmgr.AliasStartBlockHeight)


scidInteger := binary.BigEndian.Uint64(scidBytes)
return SerialisedScid(scidInteger)
return q.ID.Scid()
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I have that code in a WIP branch (lnd-0-19-staging-rebased already:

minBlock := uint32(aliasmgr.AliasStartBlockHeight)

@guggero guggero merged commit 15582a5 into main Sep 17, 2024
18 checks passed
@guggero guggero deleted the rfq-simple-refactor branch September 17, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants