Skip to content

Commit b92f2d8

Browse files
committed
fuzz: InvalidateBlock, ResetBlockFailureFlags
1 parent 91dd285 commit b92f2d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/fuzz/block_index_tree.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@ FUZZ_TARGET(block_index_tree, .init = initialize_block_index_tree)
168168
}
169169
}
170170
}
171+
},
172+
[&] {
173+
// InvalidateBlock
174+
CBlockIndex* prev_block = PickValue(fuzzed_data_provider, blocks);
175+
BlockValidationState state;
176+
chainman.ActiveChainstate().InvalidateBlock(state, prev_block);
177+
},
178+
[&] {
179+
// ReconsiderBlock
180+
LOCK(cs_main);
181+
CBlockIndex* prev_block = PickValue(fuzzed_data_provider, blocks);
182+
chainman.ActiveChainstate().ResetBlockFailureFlags(prev_block);
171183
});
172184
}
173185
chainman.CheckBlockIndex();

0 commit comments

Comments
 (0)