Skip to content

Commit

Permalink
Add bootstrap_legacy source
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 8, 2024
1 parent 6fc74c8 commit aa1ef31
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions nano/lib/stats_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ enum class detail : uint8_t
// blockprocessor result
live,
bootstrap,
bootstrap_legacy,
unchecked,
local,
forced,
Expand Down
1 change: 1 addition & 0 deletions nano/node/blockprocessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum class block_source
unknown = 0,
live,
bootstrap,
bootstrap_legacy,
unchecked,
local,
forced,
Expand Down
2 changes: 1 addition & 1 deletion nano/node/bootstrap/bootstrap_attempt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool nano::bootstrap_attempt::process_block (std::shared_ptr<nano::block> const
}
else
{
node_l->block_processor.add (block_a);
node_l->block_processor.add (block_a, nano::block_source::bootstrap_legacy);
}
return stop_pull;
}
Expand Down
2 changes: 1 addition & 1 deletion nano/node/bootstrap/bootstrap_lazy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ bool nano::bootstrap_attempt_lazy::process_block_lazy (std::shared_ptr<nano::blo
}
lazy_block_state_backlog_check (block_a, hash);
lock.unlock ();
node->block_processor.add (block_a);
node->block_processor.add (block_a, nano::block_source::bootstrap_legacy);
}
// Force drop lazy bootstrap connection for long bulk_pull
if (pull_blocks_processed > max_blocks)
Expand Down
2 changes: 1 addition & 1 deletion nano/node/bootstrap_ascending/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void nano::bootstrap_ascending::service::process (const nano::asc_pull_ack::bloc

for (auto & block : response.blocks)
{
block_processor.add (block);
block_processor.add (block, nano::block_source::bootstrap);
}
nano::lock_guard<nano::mutex> lock{ mutex };
throttle.add (true);
Expand Down

0 comments on commit aa1ef31

Please sign in to comment.