Skip to content

Commit

Permalink
block hash initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerson2102 committed Aug 10, 2024
1 parent 522a324 commit 99090f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/validation.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ impl TransactionValidatorImpl of TransactionValidator {
}

fn block_hash(self: @ChainState, block: @Block, merkle_root: u256) -> Result<u256, ByteArray> {
// TODO: implement
let header = block.header;

let mut header_data = ArrayTrait::<u32>::new();
header_data.append(*header.version);
header_data.append(*header.time);
header_data.append(*header.bits);
header_data.append(*header.nonce);
Result::Ok(0)
}

Expand Down

0 comments on commit 99090f1

Please sign in to comment.