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: actually set subject asset in QueryRateTick #1076

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

guggero
Copy link
Member

@guggero guggero commented Aug 12, 2024

Fixes the problem that because of the missing allocation, the subject asset ID was always set to an empty slice.

Reported by Luke in Slack, thanks a lot for pointing out the problem!

@guggero guggero requested review from ffranr and GeorgeTsagk August 12, 2024 11:52
@coveralls
Copy link

coveralls commented Aug 12, 2024

Pull Request Test Coverage Report for Build 10364983236

Details

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.003%) to 40.222%

Files with Coverage Reduction New Missed Lines %
tappsbt/create.go 2 53.85%
tapgarden/planter.go 2 74.87%
asset/asset.go 2 81.73%
commitment/tap.go 5 83.64%
Totals Coverage Status
Change from base Build 10354280528: 0.003%
Covered Lines: 23697
Relevant Lines: 58916

💛 - Coveralls

@dstadulis dstadulis added this to the v0.4.2 milestone Aug 12, 2024
@dstadulis dstadulis added the rfq label Aug 12, 2024
rfq/oracle_test.go Outdated Show resolved Hide resolved
Fixes the problem that because of the missing allocation, the subject
asset ID was always set to an empty slice.
@jharveyb jharveyb self-requested a review August 13, 2024 15:07
Copy link
Contributor

@jharveyb jharveyb left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏽

paymentAssetId := make([]byte, 32)
// The payment asset ID is BTC, so we leave it at all zeroes. We only
// set the subject asset ID.
copy(subjectAssetId, assetId[:])
Copy link
Contributor

Choose a reason for hiding this comment

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

super-nit: could be fn.CopySlice(assetId[:]).

@guggero guggero merged commit 4ec0dd4 into main Aug 13, 2024
17 checks passed
@guggero guggero deleted the rfq-fix-asset-id branch August 13, 2024 19:17
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