Improve block_exists table lookup order (#1765)
This commit is contained in:
parent
ebdcdad19d
commit
1b1b7f283c
1 changed files with 3 additions and 2 deletions
|
@ -1709,13 +1709,14 @@ bool nano::mdb_store::block_exists (nano::transaction const & transaction_a, nan
|
|||
|
||||
bool nano::mdb_store::block_exists (nano::transaction const & tx_a, nano::block_hash const & hash_a)
|
||||
{
|
||||
// Table lookups are ordered by match probability
|
||||
// clang-format off
|
||||
return
|
||||
block_exists (tx_a, nano::block_type::state, hash_a) ||
|
||||
block_exists (tx_a, nano::block_type::send, hash_a) ||
|
||||
block_exists (tx_a, nano::block_type::receive, hash_a) ||
|
||||
block_exists (tx_a, nano::block_type::open, hash_a) ||
|
||||
block_exists (tx_a, nano::block_type::change, hash_a) ||
|
||||
block_exists (tx_a, nano::block_type::state, hash_a);
|
||||
block_exists (tx_a, nano::block_type::change, hash_a);
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue