Skip to content

Commit

Permalink
Set receipt status info (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas authored Nov 24, 2020
1 parent 8b73597 commit d438171
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frame/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ decl_module! {
};

let receipt = ethereum::Receipt {
state_root: H256::default(), // TODO: should be okay / error status.
state_root: match reason {
ExitReason::Succeed(_) => H256::from_low_u64_be(1),
ExitReason::Error(_) => H256::from_low_u64_le(0),
ExitReason::Revert(_) => H256::from_low_u64_le(0),
ExitReason::Fatal(_) => H256::from_low_u64_le(0),
},
used_gas,
logs_bloom: status.clone().logs_bloom,
logs: status.clone().logs,
Expand Down

0 comments on commit d438171

Please sign in to comment.