override old accept_fee_base setting of 1000000 to new default 500000 (#3539)

* 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
This commit is contained in:
John Tromp 2021-01-06 16:24:11 +01:00 committed by GitHub
parent 6f142b4c75
commit 4877f30e2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

@ -323,6 +323,7 @@ fn comments() -> HashMap<String, String> {
"accept_fee_base".to_string(), "accept_fee_base".to_string(),
" "
#base fee that's accepted into the pool #base fee that's accepted into the pool
#a setting to 1000000 will be overridden to 500000 to respect the fixfees RFC
" "
.to_string(), .to_string(),
); );

View file

@ -160,15 +160,18 @@ fn real_main() -> i32 {
global::init_global_nrd_enabled(true); global::init_global_nrd_enabled(true);
} }
} }
global::init_global_accept_fee_base( let afb = config
config .members
.members .as_ref()
.as_ref() .unwrap()
.unwrap() .server
.server .pool_config
.pool_config .accept_fee_base;
.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()); info!("Accept Fee Base: {:?}", global::get_accept_fee_base());
global::init_global_future_time_limit(config.members.unwrap().server.future_time_limit); global::init_global_future_time_limit(config.members.unwrap().server.future_time_limit);
info!("Future Time Limit: {:?}", global::get_future_time_limit()); info!("Future Time Limit: {:?}", global::get_future_time_limit());