Skip to content
Snippets Groups Projects
Commit d16a3c22 authored by Anthony GRAIGNIC's avatar Anthony GRAIGNIC
Browse files

Fix max_update_network_difficulty_percent unit

parent 04566504
No related branches found
No related tags found
1 merge request!107Update difficulty only every P blocks
Pipeline #6625 passed
......@@ -34,7 +34,8 @@ pub fn update_network_difficulty(
cmp::min(
updated_network_difficulty,
prev_network_difficulty_u64
* block_spec.params.max_update_network_difficulty_percent,
* block_spec.params.max_update_network_difficulty_percent
/ 100,
)
.into(),
)
......
......@@ -561,7 +561,7 @@ mod tests {
desired_demurrage_percent_per_day: 0,
difficulty_adjustment_period: 10,
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000,
miner_fixed_reward_per_transaction: U256::from(21000_u128),
},
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 0,
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 0,
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 0,
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
......@@ -38,7 +38,7 @@
desired_demurrage_percent_per_day: 0,
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr 21000
),
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 1000, // 10%
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 1000, // 10%
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
......@@ -37,7 +37,7 @@
desired_demurrage_percent_per_day: 1000, // 10%
difficulty_adjustment_period: 10, // P
min_update_network_difficulty_percent: 25,
max_update_network_difficulty_percent: 4,
max_update_network_difficulty_percent: 400,
transaction_fees_percentage: 1000, // fr
miner_fixed_reward_per_transaction: "0x5208", // tr
),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment