This repository was archived by the owner on Apr 2, 2024. It is now read-only.
fix(BUX-461) fee quotes for both arc and mAPI with user defined fee quote#533
Merged
chris-4chain merged 12 commits intomasterfrom Jan 12, 2024
Merged
fix(BUX-461) fee quotes for both arc and mAPI with user defined fee quote#533chris-4chain merged 12 commits intomasterfrom
chris-4chain merged 12 commits intomasterfrom
Conversation
Contributor
|
Welcome to our open-source project @chris-4chain! 💘 |
7 tasks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #533 +/- ##
==========================================
+ Coverage 51.85% 51.88% +0.03%
==========================================
Files 107 109 +2
Lines 11191 11250 +59
==========================================
+ Hits 5803 5837 +34
- Misses 4927 4946 +19
- Partials 461 467 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
dorzepowski
reviewed
Jan 12, 2024
dorzepowski
approved these changes
Jan 12, 2024
cb1af03 to
2410e8e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
The primary goal of this task was to calculate the lowest fee for ARC mode, similar to what is done with mAPI. Additionally, to allow users (e.g., bux-server) configure a fee unit (satoshis/bytes) when use_fee_quotes is disabled.
To accomplish this, I had to rewrite some parts of the chainstate package. This was mainly due to the chainstate.Client being tightly coupled with minercraft.
I moved the minercraft initialization functions to
minercraft_init.go. Then, I created another filebroadcast_client_init.go, which contains an algorithm to calculate the lowest fee based on the GetFeeQuote function from the broadcast-client.For reviewers:
The most interesting files to review are:
chainstate/client.gochainstate/minercraft_init.gochainstate/broadcast_client_init.gomodel_draft_transaction.go