-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix upper bound in cursor and remove in topper batch #1180
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cc8c0ed
Fix corner case in upper bound
Harrm 03e2960
Fix bug in topper batch remove
Harrm d2cea1e
Merge with master
Harrm cbc0bad
Remove debug ad-hocs
Harrm 003078b
Fix transaction functionality in storage
Harrm 199aeb7
Fix db editor and trie tests
Harrm b85e77c
Merge branch 'master' into fix/cursor-upper-bound
Harrm 4ed0f9f
Fix test
Harrm df524ff
Merge with master
Harrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ | |
#include "clock/impl/clock_impl.hpp" | ||
#include "log/profiling_logger.hpp" | ||
#include "runtime/common/runtime_transaction_error.hpp" | ||
#include "runtime/memory.hpp" | ||
#include "runtime/memory_provider.hpp" | ||
#include "runtime/ptr_size.hpp" | ||
#include "runtime/trie_storage_provider.hpp" | ||
#include "scale/encode_append.hpp" | ||
#include "storage/predefined_keys.hpp" | ||
#include "storage/trie/polkadot_trie/trie_error.hpp" | ||
#include "storage/trie/impl/topper_trie_batch_impl.hpp" | ||
#include "storage/trie/serialization/ordered_trie_hash.hpp" | ||
|
||
using kagome::common::Buffer; | ||
|
@@ -140,12 +140,7 @@ namespace kagome::host_api { | |
auto result = get(key_buffer); | ||
|
||
if (result) { | ||
auto& opt_buf = result.value(); | ||
if (opt_buf.has_value()) { | ||
SL_TRACE_FUNC_CALL(logger_, opt_buf.value().get().toHex(), key_buffer); | ||
} else { | ||
SL_TRACE_FUNC_CALL(logger_, std::string_view{"none"}, key_buffer); | ||
} | ||
SL_TRACE_FUNC_CALL(logger_, result.value(), key_buffer); | ||
} else { | ||
logger_->error( | ||
error_message, key_buffer.toHex(), result.error().message()); | ||
|
@@ -212,7 +207,7 @@ namespace kagome::host_api { | |
if (limit_opt) { | ||
SL_TRACE_VOID_FUNC_CALL(logger_, prefix, limit_opt.value()); | ||
} else { | ||
SL_TRACE_VOID_FUNC_CALL(logger_, prefix, std::string_view{"none"}); | ||
SL_TRACE_VOID_FUNC_CALL(logger_, prefix, std::string_view {"none"}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the file missing autoformat |
||
} | ||
return clearPrefix(prefix, limit_opt); | ||
} | ||
|
@@ -325,6 +320,7 @@ namespace kagome::host_api { | |
|
||
void StorageExtension::ext_storage_commit_transaction_version_1() { | ||
auto res = storage_provider_->commitTransaction(); | ||
SL_TRACE_VOID_FUNC_CALL(logger_); | ||
if (res.has_error()) { | ||
logger_->error("Storage transaction rollback has failed: {}", | ||
res.error().message()); | ||
|
@@ -334,6 +330,7 @@ namespace kagome::host_api { | |
|
||
void StorageExtension::ext_storage_rollback_transaction_version_1() { | ||
auto res = storage_provider_->rollbackTransaction(); | ||
SL_TRACE_VOID_FUNC_CALL(logger_); | ||
if (res.has_error()) { | ||
logger_->error("Storage transaction commit has failed: {}", | ||
res.error().message()); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,4 +70,5 @@ namespace kagome::storage::trie { | |
} | ||
return empty_hash; | ||
} | ||
|
||
} // namespace kagome::storage::trie |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is defined when BOOST_ASSERT is compiled to noop.