Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Remove account_id from Add/Subtract commands #1511

Merged
merged 4 commits into from
Jul 3, 2018
Merged

Conversation

l4l
Copy link
Contributor

@l4l l4l commented Jun 28, 2018

Description of the Change

AddAssetQuantity & SubtractAssetQuantity had useless account_id field that is required to be equal to the tx creator (otherwise it will causes stateless fail). In this pr:

  • account_id is removed from the commands (in both old and new models)
  • docs are fixed (as well as copy-paste bug for SubtractAssetQuantity)
  • bindings are fixed (python/java/node)
  • examples are fixed (python for AddAssetQuantity)
  • redundant (for the field) tests are removed (please be careful with reviewing that particular fixes)

Benefits

Cleaner API

Possible Drawbacks

None?

l4l added 2 commits June 29, 2018 01:46
Signed-off-by: Kitsu <mail@kitsu.me>
Signed-off-by: Kitsu <mail@kitsu.me>
@l4l l4l added needs-review pr awaits review from maintainers refactoring internal stuff, that are changed/removed that doesn't affect client code command All that relates to the commands performing at iroha API labels Jun 28, 2018
@@ -217,7 +215,6 @@ namespace shared_model {
* @return builder with subtract asset quantity command appended
*/
ModelTransactionBuilder subtractAssetQuantity(
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, fix method description here as well.

Signed-off-by: Kitsu <mail@kitsu.me>
@sorabot
Copy link

sorabot commented Jun 29, 2018

SonarQube analysis reported 3 issues

  1. MINOR command_executor.cpp#L39: Function parameter 'command_name' should be passed by reference. rule
  2. MINOR ordering_gate_service_test.cpp#L47: Variable 'pcs_' is assigned in constructor body. Consider performing initialization in initialization list. rule
  3. MINOR command_validate_execute_test.cpp#L167: The function 'checkErrorCase' is never used. rule

@sorabot
Copy link

sorabot commented Jun 29, 2018

Signed-off-by: Kitsu <mail@kitsu.me>
@sorabot
Copy link

sorabot commented Jun 29, 2018

@l4l l4l removed the needs-review pr awaits review from maintainers label Jun 30, 2018
@l4l l4l merged commit b76628c into develop Jul 3, 2018
@l4l l4l deleted the fix/redundant_acc branch July 3, 2018 09:28
l4l added a commit that referenced this pull request Jul 25, 2018
Signed-off-by: Kitsu <mail@kitsu.me>
l4l added a commit that referenced this pull request Jul 25, 2018
Signed-off-by: Kitsu <mail@kitsu.me>
l4l added a commit that referenced this pull request Jul 25, 2018
Signed-off-by: Kitsu <mail@kitsu.me>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API command All that relates to the commands performing at iroha refactoring internal stuff, that are changed/removed that doesn't affect client code
Development

Successfully merging this pull request may close these issues.

None yet

4 participants