Do not add processed live traffic into priorities (#4801)
- processed live traffic doesn't need bootstrapping Co-authored-by: gr0vity-dev <homebot@users.noreply.github.com>
This commit is contained in:
parent
f27a407976
commit
878e7a1360
1 changed files with 14 additions and 10 deletions
|
|
@ -271,17 +271,21 @@ void nano::bootstrap_service::inspect (secure::transaction const & tx, nano::blo
|
||||||
{
|
{
|
||||||
case nano::block_status::progress:
|
case nano::block_status::progress:
|
||||||
{
|
{
|
||||||
const auto account = block.account ();
|
// Progress blocks from live traffic don't need further bootstrapping
|
||||||
|
if (source != nano::block_source::live)
|
||||||
// If we've inserted any block in to an account, unmark it as blocked
|
|
||||||
accounts.unblock (account);
|
|
||||||
accounts.priority_up (account);
|
|
||||||
|
|
||||||
if (block.is_send ())
|
|
||||||
{
|
{
|
||||||
auto destination = block.destination ();
|
const auto account = block.account ();
|
||||||
accounts.unblock (destination, hash); // Unblocking automatically inserts account into priority set
|
|
||||||
accounts.priority_set (destination);
|
// If we've inserted any block in to an account, unmark it as blocked
|
||||||
|
accounts.unblock (account);
|
||||||
|
accounts.priority_up (account);
|
||||||
|
|
||||||
|
if (block.is_send ())
|
||||||
|
{
|
||||||
|
auto destination = block.destination ();
|
||||||
|
accounts.unblock (destination, hash); // Unblocking automatically inserts account into priority set
|
||||||
|
accounts.priority_set (destination);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue