Skip to content

Commit

Permalink
Merge pull request #22 from keep-starknet-strange/mk/validate_merkle_…
Browse files Browse the repository at this point in the history
…root

Draft of validate_merkle_root
  • Loading branch information
maciejka authored Aug 2, 2024
2 parents c972cf7 + b33b6ab commit 1ee9e5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/validation.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ impl BlockValidatorImpl of BlockValidator {
validate_target(@self, @block)?;
validate_timestamp(@self, @block)?;

// validate_merkle_root
validate_merkle_root(@self, @block)?;
// validate_and_apply_transactions

let prev_timestamps = next_prev_timestamps(@self, @block);
Expand Down Expand Up @@ -58,3 +58,8 @@ fn adjust_difficulty(self: @ChainState, block: @Block) -> (u32, u32) {
// TODO: implement
(*self.current_target, *self.epoch_start_time)
}

fn validate_merkle_root(self: @ChainState, block: @Block) -> Result<(), ByteArray> {
// TODO: implement
Result::Ok(())
}

0 comments on commit 1ee9e5d

Please sign in to comment.