-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the unchecked_store from the store classes
Kept the lmdb::unchecked_store because it contains the LMDB file handler that will be used by the database upgrade code (to be added).
- Loading branch information
Thiago Silva
committed
Apr 19, 2023
1 parent
f5ec339
commit 2500dfb
Showing
12 changed files
with
15 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,16 @@ | ||
#pragma once | ||
|
||
#include <nano/secure/store.hpp> | ||
|
||
#include <lmdb/libraries/liblmdb/lmdb.h> | ||
|
||
namespace nano | ||
namespace nano::lmdb | ||
{ | ||
namespace lmdb | ||
class unchecked_store | ||
{ | ||
class store; | ||
class unchecked_store : public nano::unchecked_store | ||
{ | ||
private: | ||
nano::lmdb::store & store; | ||
|
||
public: | ||
unchecked_store (nano::lmdb::store & store_a); | ||
|
||
void clear (nano::write_transaction const & transaction_a) override; | ||
void put (nano::write_transaction const & transaction_a, nano::hash_or_account const & dependency, nano::unchecked_info const & info_a) override; | ||
bool exists (nano::transaction const & transaction_a, nano::unchecked_key const & unchecked_key_a) override; | ||
void del (nano::write_transaction const & transaction_a, nano::unchecked_key const & key_a) override; | ||
nano::store_iterator<nano::unchecked_key, nano::unchecked_info> end () const override; | ||
nano::store_iterator<nano::unchecked_key, nano::unchecked_info> begin (nano::transaction const & transaction_a) const override; | ||
nano::store_iterator<nano::unchecked_key, nano::unchecked_info> lower_bound (nano::transaction const & transaction_a, nano::unchecked_key const & key_a) const override; | ||
size_t count (nano::transaction const & transaction_a) override; | ||
|
||
/** | ||
* Unchecked bootstrap blocks info. | ||
* nano::block_hash -> nano::unchecked_info | ||
*/ | ||
MDB_dbi unchecked_handle{ 0 }; | ||
}; | ||
} | ||
public: | ||
/** | ||
* Unchecked bootstrap blocks info. | ||
* nano::block_hash -> nano::unchecked_info | ||
*/ | ||
MDB_dbi unchecked_handle{ 0 }; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.