-
Notifications
You must be signed in to change notification settings - Fork 38
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
BASE_FEE from config file with default ergo_lib::wallet::tx_builder::SUGGESTED_TX_FEE() #104
Conversation
Pull Request Test Coverage Report for Build 2956049993
💛 - Coveralls |
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.
Looking great! Please check my comments for name and default value.
core/src/oracle_config.rs
Outdated
@@ -125,6 +127,10 @@ lazy_static! { | |||
pub static ref ORACLE_CONFIG: OracleConfig = OracleConfig::load().unwrap(); | |||
pub static ref MAYBE_ORACLE_CONFIG: Result<OracleConfig, String> = | |||
OracleConfig::load().map_err(|e| e.to_string()); | |||
pub static ref SAFE_USER_MIN: BoxValue = MAYBE_ORACLE_CONFIG |
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 suggest to name it BASE_FEE
(close to OracleConfig::base_fee
). SAFE_USER_MIN
name comes from a box value minimal value limit (to prevent dust) and has nothing to do with tx fee.
The use of BoxValue::SAFE_USER_MIN
for tx fee throughout the code was incorrect in the first place and should be avoided. There is ergo_lib::wallet::tx_builder::SUGGESTED_TX_FEE()
intended for this case. Please, use it if config is unavailable.
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.
You are right. Changes have been made.
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.
Great! Thank you!
Please, make Clippy happy. :) |
Clippy is happy now. 😀 |
No description provided.