mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-23 18:53:13 +00:00
rename
This commit is contained in:
parent
2e582e7874
commit
a94440fa1f
@ -25,7 +25,7 @@ pub struct ChainedCall {
|
|||||||
pub struct ProgramOutput {
|
pub struct ProgramOutput {
|
||||||
pub pre_states: Vec<AccountWithMetadata>,
|
pub pre_states: Vec<AccountWithMetadata>,
|
||||||
pub post_states: Vec<Account>,
|
pub post_states: Vec<Account>,
|
||||||
pub chained_call: Vec<ChainedCall>,
|
pub chained_calls: Vec<ChainedCall>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read_nssa_inputs<T: DeserializeOwned>() -> ProgramInput<T> {
|
pub fn read_nssa_inputs<T: DeserializeOwned>() -> ProgramInput<T> {
|
||||||
@ -42,7 +42,7 @@ pub fn write_nssa_outputs(pre_states: Vec<AccountWithMetadata>, post_states: Vec
|
|||||||
let output = ProgramOutput {
|
let output = ProgramOutput {
|
||||||
pre_states,
|
pre_states,
|
||||||
post_states,
|
post_states,
|
||||||
chained_call: Vec::new(),
|
chained_calls: Vec::new(),
|
||||||
};
|
};
|
||||||
env::commit(&output);
|
env::commit(&output);
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ pub fn write_nssa_outputs_with_chained_call(
|
|||||||
let output = ProgramOutput {
|
let output = ProgramOutput {
|
||||||
pre_states,
|
pre_states,
|
||||||
post_states,
|
post_states,
|
||||||
chained_call,
|
chained_calls: chained_call,
|
||||||
};
|
};
|
||||||
env::commit(&output);
|
env::commit(&output);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,11 +27,11 @@ fn main() {
|
|||||||
let ProgramOutput {
|
let ProgramOutput {
|
||||||
pre_states,
|
pre_states,
|
||||||
post_states,
|
post_states,
|
||||||
chained_call,
|
chained_calls,
|
||||||
} = program_output;
|
} = program_output;
|
||||||
|
|
||||||
// TODO: implement chained calls for privacy preserving transactions
|
// TODO: implement chained calls for privacy preserving transactions
|
||||||
if !chained_call.is_empty() {
|
if !chained_calls.is_empty() {
|
||||||
panic!("Privacy preserving transactions do not support yet chained calls.")
|
panic!("Privacy preserving transactions do not support yet chained calls.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -148,7 +148,7 @@ impl PublicTransaction {
|
|||||||
state_diff.insert(pre.account_id, post.clone());
|
state_diff.insert(pre.account_id, post.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
chained_calls.extend_from_slice(&program_output.chained_call);
|
chained_calls.extend_from_slice(&program_output.chained_calls);
|
||||||
|
|
||||||
if let Some(next_chained_call) = chained_calls.pop() {
|
if let Some(next_chained_call) = chained_calls.pop() {
|
||||||
program_id = next_chained_call.program_id;
|
program_id = next_chained_call.program_id;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user