Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2068 from Cargill/ltseeley-1-1-txn-execution-data
Browse files Browse the repository at this point in the history
1-1 BACKPORT: Fix TxnExecutionResult.data field
  • Loading branch information
vaporos authored Apr 15, 2019
2 parents 6f98e14 + 3114853 commit 11ecb96
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion validator/sawtooth_validator/execution/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ def add_execution_data(self, context_id, data):
Args:
context_id (str): the context id returned by create_context
data_type (str): type of data to append
data (bytes): data to append
Returns:
Expand Down
2 changes: 1 addition & 1 deletion validator/src/journal/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ impl<'a> From<&'a TxnExecutionResult> for TransactionReceipt {
let mut receipt = TransactionReceipt::new();

receipt.set_data(protobuf::RepeatedField::from_vec(
result.data.iter().map(|(_, data)| data.clone()).collect(),
result.data.iter().map(|data| data.clone()).collect(),
));
receipt.set_state_changes(protobuf::RepeatedField::from_vec(
result.state_changes.clone(),
Expand Down
2 changes: 1 addition & 1 deletion validator/src/scheduler/execution_result_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct PyTxnExecutionResult {
pub state_hash: Option<String>,
pub state_changes: Vec<StateChange>,
pub events: Vec<Event>,
pub data: Vec<(String, Vec<u8>)>,
pub data: Vec<Vec<u8>>,
pub error_message: String,
pub error_data: Vec<u8>,
}
Expand Down
2 changes: 1 addition & 1 deletion validator/src/scheduler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct TxnExecutionResult {
pub is_valid: bool,
pub state_changes: Vec<StateChange>,
pub events: Vec<Event>,
pub data: Vec<(String, Vec<u8>)>,
pub data: Vec<Vec<u8>>,
pub error_message: String,
pub error_data: Vec<u8>,
}
Expand Down

0 comments on commit 11ecb96

Please sign in to comment.