We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b40a951 commit f6ff419Copy full SHA for f6ff419
jaeseung-blockchain/src/block/block.rs
@@ -68,7 +68,7 @@ impl Block {
68
match new_height {
69
0..=9 => 0,
70
10..=19 => 1,
71
- h if h % 10 != DIFFICULTY_ADJUSTMENT_INTERVAL_COUNT as i32 => {
+ h if h % DIFFICULTY_ADJUSTMENT_INTERVAL_COUNT as i32 != 0 => {
72
previous_block.header.difficulty
73
}
74
_ => {
jaeseung-blockchain/src/main.rs
@@ -8,7 +8,7 @@ use chain::Chain;
8
fn main() {
9
let mut chain = Chain::new().unwrap();
10
11
- for x in 1..30000 {
+ for x in 1..10 {
12
chain.add_block(&vec![format!("data-{x}").to_string()]);
13
14
0 commit comments