rename call_path to data in StepperOutcome (#37)

This commit is contained in:
vms 2020-12-13 00:10:53 +03:00 committed by GitHub
parent fcdca0af73
commit 61547cb085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ impl Into<StepperOutcome> for AquamarineError {
StepperOutcome { StepperOutcome {
ret_code, ret_code,
call_path: format!("{}", self), data: format!("{}", self),
next_peer_pks: vec![], next_peer_pks: vec![],
} }
} }

View File

@ -46,11 +46,11 @@ fn execute_aqua_impl(init_peer_id: String, aqua: String, prev_path: String, path
aqua.execute(&mut exec_ctx, &mut call_ctx)?; aqua.execute(&mut exec_ctx, &mut call_ctx)?;
let next_peer_pks = dedup(exec_ctx.next_peer_pks); let next_peer_pks = dedup(exec_ctx.next_peer_pks);
let serialized_call_path = serde_json::to_string(&call_ctx.new_path).map_err(CallSeError)?; let data = serde_json::to_string(&call_ctx.new_path).map_err(CallSeError)?;
Ok(StepperOutcome { Ok(StepperOutcome {
ret_code: STEPPER_SUCCESS, ret_code: STEPPER_SUCCESS,
call_path: serialized_call_path, data,
next_peer_pks, next_peer_pks,
}) })
} }

View File

@ -26,7 +26,7 @@ pub struct StepperOutcome {
pub ret_code: i32, pub ret_code: i32,
/// Contains data if ret_code == 0, otherwise error message (that could be empty string). /// Contains data if ret_code == 0, otherwise error message (that could be empty string).
pub call_path: String, pub data: String,
/// Public keys of peers that should receive data. /// Public keys of peers that should receive data.
pub next_peer_pks: Vec<String>, pub next_peer_pks: Vec<String>,