Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 8: [PATCH 08/68] ci: restore Roots assurance on Core 30.3 interfaces

src/test/fuzz/mini_miner.cpp

Before: src/test/fuzz/mini_miner.cpp · After: src/test/fuzz/mini_miner.cpp

File metadata
index 9c3ec7debf5d001d5a294581d660d87314491f54..a76022f975c3e1516cd01ff3f2ba60f08f4d11c0 100644

Download original patch · Release notes

Diff rows 1–22 of 22. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/test/fuzz/mini_miner.cpp CHANGED
@@ -37,6 +37,14 @@ void initialize_miner()
37
  }
38
  }
39
 
 
 
 
 
 
 
 
 
40
  // Test that the MiniMiner can run with various outpoints and feerates.
41
  FUZZ_TARGET(mini_miner, .init = initialize_miner)
42
  {
@@ -118,7 +126,7 @@ FUZZ_TARGET(mini_miner, .init = initialize_miner)
118
  }
119
 
120
  // Test that MiniMiner and BlockAssembler build the same block given the same transactions and constraints.
121
- FUZZ_TARGET(mini_miner_selection, .init = initialize_miner)
122
  {
123
  SeedRandomStateForTest(SeedRand::ZEROS);
124
  FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
 
37
  }
38
  }
39
 
40
+ void initialize_miner_selection()
41
+ {
42
+ initialize_miner();
43
+ // MiniMiner models fee-based package selection, so disable the
44
+ // BlockAssembler's independent coin-age-priority region for comparison.
45
+ gArgs.ForceSetArg("-blockprioritysize", 0);
46
+ }
47
+
48
  // Test that the MiniMiner can run with various outpoints and feerates.
49
  FUZZ_TARGET(mini_miner, .init = initialize_miner)
50
  {
 
126
  }
127
 
128
  // Test that MiniMiner and BlockAssembler build the same block given the same transactions and constraints.
129
+ FUZZ_TARGET(mini_miner_selection, .init = initialize_miner_selection)
130
  {
131
  SeedRandomStateForTest(SeedRand::ZEROS);
132
  FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};