Simplify unchecked_get
This commit is contained in:
parent
3f2f2da812
commit
1828587387
1 changed files with 2 additions and 1 deletions
|
@ -1770,8 +1770,9 @@ std::shared_ptr<rai::vote> rai::mdb_store::vote_get (rai::transaction const & tr
|
|||
std::vector<std::shared_ptr<rai::block>> rai::mdb_store::unchecked_get (rai::transaction const & transaction_a, rai::block_hash const & hash_a)
|
||||
{
|
||||
std::vector<std::shared_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; ++i)
|
||||
{
|
||||
assert (rai::block_hash (i->first) == hash_a);
|
||||
std::shared_ptr<rai::block> block (i->second);
|
||||
result.push_back (block);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue