Skip to content

Commit

Permalink
fix conflict in validation.cairo
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka authored Aug 9, 2024
1 parent e0bf909 commit 648ddb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/validation.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ impl BlockValidatorImpl of BlockValidator {
let best_block_hash = block_hash(@block, merkle_root)?;
let prev_timestamps = next_prev_timestamps(@self, @block);
let (current_target, epoch_start_time) = adjust_difficulty(@self, @block);
let total_work = compute_total_work(self.total_work, bits_to_target(block.header.bits).unwrap());
let total_work = compute_total_work(
self.total_work, bits_to_target(block.header.bits).unwrap()
);
let block_height = self.block_height + 1;

Result::Ok(
Expand Down Expand Up @@ -223,7 +225,7 @@ fn compute_block_reward(block_height: u32) -> u64 {
mod tests {
use super::{
validate_target, validate_timestamp, validate_proof_of_work, compute_block_reward,
compute_total_work, shr, shl, REWARD_INITIAL, POW_SATS_AMOUNT
compute_total_work, compute_work_from_target, shr, shl, REWARD_INITIAL, POW_SATS_AMOUNT
};
use super::{Block, ChainState, UtreexoState};
use super::super::state::{Header, Transaction, TxIn, TxOut};
Expand Down

0 comments on commit 648ddb3

Please sign in to comment.