Stop iterating after hash changes, not at end of database.
This commit is contained in:
parent
213c72be8a
commit
636d015ed9
1 changed files with 1 additions and 1 deletions
|
@ -2337,7 +2337,7 @@ void rai::block_store::unchecked_put (MDB_txn * transaction_a, rai::block_hash c
|
|||
std::vector <std::unique_ptr <rai::block>> rai::block_store::unchecked_get (MDB_txn * transaction_a, rai::block_hash const & hash_a)
|
||||
{
|
||||
std::vector <std::unique_ptr <rai::block>> result;
|
||||
for (auto i (unchecked_begin (transaction_a, hash_a)), n (unchecked_end ()); i != n && rai::block_hash (i->first) == hash_a; ++i)
|
||||
for (auto i (unchecked_begin (transaction_a, hash_a)), n (unchecked_begin (transaction_a, hash_a.number () + 1)); i != n && rai::block_hash (i->first) == hash_a; ++i)
|
||||
{
|
||||
rai::bufferstream stream (reinterpret_cast <uint8_t const *> (i->second.mv_data), i->second.mv_size);
|
||||
result.push_back (rai::deserialize_block (stream));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue