Skip to content

Change call_order_update_operation to return order_id #1269 - #1352

Merged
pmconrad merged 2 commits into
bitshares:developfrom
cogutvalera:issue_1269
Oct 1, 2018
Merged

Change call_order_update_operation to return order_id #1269#1352
pmconrad merged 2 commits into
bitshares:developfrom
cogutvalera:issue_1269

Conversation

@cogutvalera

Copy link
Copy Markdown
Member

PR for #1269 "Change call_order_update_operation to return order_id"

@jmjatlanta jmjatlanta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not sure what should be done in this case. Should we be returning an ID of something that no longer exists? If no, what should we return?

FC_ASSERT( new_collateral == 0, "Should claim all collateral when closing debt position" );
d.remove( *call_obj );
return void_result();
return call_order_id;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we return the id of a deleted object?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

why not ? :) IMHO the id of a deleted object may be helpful for looking history of that object, even it is better than return nothing ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree, makes sense to return it.

Comment thread libraries/chain/market_evaluator.cpp Outdated
_bitasset_data->current_feed.maintenance_collateral_ratio );
call.target_collateral_ratio = o.extensions.value.target_collateral_ratio;
});
call_order_id = call_obj->id;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is superfluous, modify() will not change the id.

@cogutvalera

cogutvalera commented Oct 1, 2018

Copy link
Copy Markdown
Member Author

@pmconrad @jmjatlanta

any other changes must be here or we can approve and merge this PR ?

Thanks a lot !

@pmconrad pmconrad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@pmconrad
pmconrad merged commit 293e8da into bitshares:develop Oct 1, 2018
@cogutvalera

Copy link
Copy Markdown
Member Author

Thanks for review ! Thank you very much for your time and efforts !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants