Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
damip committed Jul 3, 2023
1 parent 54e0279 commit 6841082
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions massa-execution-worker/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1103,22 +1103,22 @@ impl ExecutionContext {

/// Generate the execution trail hash
fn generate_execution_trail_hash(
previout_execution_trail_hash: &massa_hash::Hash,
previous_execution_trail_hash: &massa_hash::Hash,
slot: &Slot,
opt_block_id: Option<&BlockId>,
read_only: bool,
) -> massa_hash::Hash {
match opt_block_id {
Some(block_id) => massa_hash::Hash::compute_from_tuple(&[
previout_execution_trail_hash.to_bytes(),
None => massa_hash::Hash::compute_from_tuple(&[
previous_execution_trail_hash.to_bytes(),
&slot.to_bytes_key(),
&[1u8, if read_only { 1u8 } else { 0u8 }],
block_id.to_bytes(),
&[if read_only { 1u8 } else { 0u8 }, 0u8],
]),
None => massa_hash::Hash::compute_from_tuple(&[
previout_execution_trail_hash.to_bytes(),
Some(block_id) => massa_hash::Hash::compute_from_tuple(&[
previous_execution_trail_hash.to_bytes(),
&slot.to_bytes_key(),
&[0u8, if read_only { 1u8 } else { 0u8 }],
&[if read_only { 1u8 } else { 0u8 }, 1u8],
block_id.to_bytes(),
]),
}
}

0 comments on commit 6841082

Please sign in to comment.