Skip to content

Commit

Permalink
changed scope of match_indexes to make sure they are always reset eve…
Browse files Browse the repository at this point in the history
…n if R bucket is empty Chia-Network/chia-blockchain#504 (#132)
  • Loading branch information
wjblanke committed Dec 2, 2020
1 parent 8f612e6 commit cc88672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/phase1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ void* phase1_thread(THREADDATA* ptd)
current_entries_to_write;
std::vector<std::tuple<PlotEntry, PlotEntry, std::pair<Bits, Bits>>>
future_entries_to_write;
std::vector<std::pair<uint16_t, uint16_t>> match_indexes;
std::vector<PlotEntry*> not_dropped; // Pointers are stored to avoid copying entries

if (pos == 0) {
Expand Down Expand Up @@ -267,6 +266,8 @@ void* phase1_thread(THREADDATA* ptd)
// so now we can compare entries in both buckets to find matches. If two entries
// match, match, the result is written to the right table. However the writing
// happens in the next iteration of the loop, since we need to remap positions.
std::vector<std::pair<uint16_t, uint16_t>> match_indexes;

if (!bucket_L.empty()) {
not_dropped.clear();

Expand Down

0 comments on commit cc88672

Please sign in to comment.