Skip to content

Commit

Permalink
Merging identical code branches for convenience ::put function.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Jun 9, 2022
1 parent f6874e3 commit a17157e
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions nano/secure/store/unchecked_store_partial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,9 @@ class unchecked_store_partial : public unchecked_store

void put (nano::write_transaction const & transaction_a, nano::block_hash const & hash_a, std::shared_ptr<nano::block> const & block_a) override
{
nano::lock_guard<std::recursive_mutex> lock{ mutex };
if (entries == nullptr)
{
nano::unchecked_key key (hash_a, block_a->hash ());
nano::unchecked_info info{ block_a, block_a->account (), nano::seconds_since_epoch (), nano::signature_verification::unknown };
put (transaction_a, key, info);
}
else
{
nano::unchecked_key key (hash_a, block_a->hash ());
nano::unchecked_info info{ block_a, block_a->account (), nano::seconds_since_epoch (), nano::signature_verification::unknown };
put (transaction_a, key, info);
}
nano::unchecked_key key{ hash_a, block_a->hash () };
nano::unchecked_info info{ block_a, block_a->account (), nano::seconds_since_epoch (), nano::signature_verification::unknown };
put (transaction_a, key, info);
}

bool exists (nano::transaction const & transaction_a, nano::unchecked_key const & unchecked_key_a) override
Expand Down

0 comments on commit a17157e

Please # to comment.