-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat: Return cell data in get_live_cell rpc #1527
feat: Return cell data in get_live_cell rpc #1527
Conversation
@zhangsoledad is assigned as the chief reviewer |
@@ -44,7 +44,7 @@ pub trait ChainRpc { | |||
) -> Result<Vec<CellOutputWithOutPoint>>; | |||
|
|||
#[rpc(name = "get_live_cell")] | |||
fn get_live_cell(&self, _out_point: OutPoint) -> Result<CellWithStatus>; | |||
fn get_live_cell(&self, _out_point: OutPoint, _with_data: bool) -> Result<CellWithStatus>; |
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.
change with_data
to optional param:
fn get_live_cell(&self, _out_point: OutPoint, _with_data: bool) -> Result<CellWithStatus>; | |
fn get_live_cell(&self, _out_point: OutPoint, _with_data: Option<bool>) -> Result<CellWithStatus>; |
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.
I think it's better explicit here, if we add another more argument in the future, it will make user confused.
we can use the optional param, it will keep rpc compatibility. |
6df2788
to
6dc1ba5
Compare
|
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.
According to the code implementation, if we do not set the second argument with_data
, it will return the wrong argument number, it's inconsistent with the RPC document.
Oops, you are right. |
BREAKING CHANGE: get_live_cell add with_data argument and result structure changed
6dc1ba5
to
bb628be
Compare
bors r=quake,u2,keroro520 |
Build succeeded
|
BREAKING CHANGE:
get_live_cell
addwith_data
argument and result structure changed.