adjusting difficulty algorithm

This commit is contained in:
viraladmin 2026-06-04 21:11:23 -06:00
parent 413adbf241
commit a621522170
4 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ async fn create_genesis_block(
// Genesis uses the fixed parent hash and launch difficulty. // Genesis uses the fixed parent hash and launch difficulty.
let timestamp = Utc::now().timestamp() as u32; let timestamp = Utc::now().timestamp() as u32;
let next_block_difficulty = 1200000000000000_u64; let next_block_difficulty = 2000000000000000_u64;
let block_struct = UnminedBlock::new( let block_struct = UnminedBlock::new(
timestamp, timestamp,
miner, miner,

View File

@ -509,7 +509,7 @@ async fn block_file_context(db: &Db, mut difficulty: u64) -> (String, u32, u64)
let next_number = if genesis_checkup().await { let next_number = if genesis_checkup().await {
current_height + 1 current_height + 1
} else { } else {
difficulty = 1200000000000000_u64; difficulty = 2000000000000000_u64;
0 0
}; };

View File

@ -134,7 +134,7 @@ impl Torrent {
} }
blockchain_data.unmined_block.next_block_difficulty blockchain_data.unmined_block.next_block_difficulty
} else { } else {
1200000000000000_u64 2000000000000000_u64
}; };
let torrent_difficulty = self.info.this_block_difficulty; let torrent_difficulty = self.info.this_block_difficulty;
if blockchain_difficulty == torrent_difficulty { if blockchain_difficulty == torrent_difficulty {

View File

@ -186,7 +186,7 @@ impl Block {
// compare the reduced header hash against the previous // compare the reduced header hash against the previous
// block's recorded target difficulty threshold // block's recorded target difficulty threshold
if !genesis_checkup().await { if !genesis_checkup().await {
let difficulty_target = 1200000000000000_u64; let difficulty_target = 2000000000000000_u64;
if hash <= difficulty_target { if hash <= difficulty_target {
return Ok(()); return Ok(());
} else { } else {