Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

chain_plugin db intrinsic table RPC calls incorrectly handling --lower and --upper in certain scenarios #9805

Merged
merged 4 commits into from
Jan 1, 2021

Conversation

vzqzhang
Copy link
Contributor

@vzqzhang vzqzhang commented Dec 17, 2020

Change Description

This PR fixes issue in https://blockone.atlassian.net/browse/EPE-515 where table RPC calls incorrectly handling --lower and --upper in certain scenarios

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@vzqzhang vzqzhang changed the title message chain_plugin db intrinsic table RPC calls incorrectly handling --lower and --upper in certain scenarios Dec 17, 2020
Copy link
Contributor

@linhuang-blockone linhuang-blockone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this fixes a bug, can you add a unit test case so we don't regress in the future?

…tly handling --lower and --upper in certain scenarios
@vzqzhang
Copy link
Contributor Author

As this fixes a bug, can you add a unit test case so we don't regress in the future?

Added unit tests

@vzqzhang
Copy link
Contributor Author

result.rows.size() was checked to be 5. No need to check it again.

Removed

@@ -116,6 +116,17 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( get_scope_test, TESTER_T, backing_store_ts) { try
BOOST_REQUIRE_EQUAL(name("initc"_n), result.rows[1].scope);
}

param.lower_bound = "initb";
param.upper_bound = "initd";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that there was a scope with "initd", so you need to set upper_bound = "inite" (or past the last scope, so you could do param.upper_bound = "z"; which should guarantee that is past the last scope, since I doubt it has any scope values that start with "z".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@brianjohnson5972 brianjohnson5972 merged commit 8fb2b9e into develop Jan 1, 2021
@vzqzhang vzqzhang deleted the chain_plugin_db_intrinsic branch January 1, 2021 01:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants