Skip to content

Commit

Permalink
override old accept_fee_base setting of 1000000 to new default 500000 (
Browse files Browse the repository at this point in the history
…#3539) (#3541)

* override old accept_fee_base setting of 1000000 to new default 500000

* document exceptional accept_fee_base behaviour in grin-server.toml

* document more accurately

Co-authored-by: John Tromp <[email protected]>
  • Loading branch information
antiochp and tromp authored Jan 6, 2021
1 parent 8849389 commit d5bd93f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions config/src/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ fn comments() -> HashMap<String, String> {
"accept_fee_base".to_string(),
"
#base fee that's accepted into the pool
#a setting to 1000000 will be overridden to 500000 to respect the fixfees RFC
"
.to_string(),
);
Expand Down
21 changes: 12 additions & 9 deletions src/bin/grin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,18 @@ fn real_main() -> i32 {
global::init_global_nrd_enabled(true);
}
}
global::init_global_accept_fee_base(
config
.members
.as_ref()
.unwrap()
.server
.pool_config
.accept_fee_base,
);
let afb = config
.members
.as_ref()
.unwrap()
.server
.pool_config
.accept_fee_base;
let fix_afb = match afb {
1_000_000 => 500_000,
_ => afb,
};
global::init_global_accept_fee_base(fix_afb);
info!("Accept Fee Base: {:?}", global::get_accept_fee_base());
global::init_global_future_time_limit(config.members.unwrap().server.future_time_limit);
info!("Future Time Limit: {:?}", global::get_future_time_limit());
Expand Down

0 comments on commit d5bd93f

Please sign in to comment.