-
Notifications
You must be signed in to change notification settings - Fork 93
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
Move out protocol fee into separate file #2157
Conversation
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.
Forgot to submit my comments yesterday.
crates/autopilot/src/run_loop.rs
Outdated
@@ -497,6 +498,7 @@ pub fn solve_request( | |||
time_limit: Duration, | |||
fee_policy: arguments::FeePolicy, | |||
) -> solve::Request { | |||
let fee_policies = protocol::fee::fee_policies(auction, fee_policy); |
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.
I would make this an object that is instantiated with the fee_policy
config (and then passed as a dependency into the runloop instead of the fee_policy
).
I assume this object will get more dependencies, such as app data look up, quote finding, etc.
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.
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.
In the next iteration we can have the fee::PolicyFactory
that will contain arguments::FeePolicy
and Arc<Database>
and be defined on the RunLoop
level, while by given Auction
it creates the fee::Policies
object.
Merging to unblock the dependent PR #2188. |
Description
Follow up to #2098
Implements second part of the comment: #2098 (comment)
Moves out the fee policy preparation of the auction into a separate file. This file should contain all the logic around protocol fees.