Skip to content

Commit

Permalink
try88
Browse files Browse the repository at this point in the history
  • Loading branch information
lla-dane committed Apr 15, 2024
1 parent e708cfd commit 7576fa6
Show file tree
Hide file tree
Showing 592 changed files with 9 additions and 15,229 deletions.
2 changes: 1 addition & 1 deletion src/block_mine/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn valid_block_header() -> Result<()> {
let map = create_txid_tx_map()?;
let (merkel_root, coinbase_tx, coinbase_txid, txids) = generate_roots(map.clone())?;

let time_stamp_int: u32 = 1713091827;
let time_stamp_int: u32 = 1713166289;
let time_stamp = hex::encode(time_stamp_int.to_le_bytes());

let target = "0000ffff00000000000000000000000000000000000000000000000000000000";
Expand Down
4 changes: 3 additions & 1 deletion src/block_mine/serialise_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ pub fn create_txid_tx_map() -> Result<Vec<(String, Transaction, String, usize, u
// Find the correct position to insert the transaction based on its fees
let position = map
.iter()
.position(|(_, _, _, _, gas_fees)| fees > *gas_fees)
.position(|(_, _, _, net_weight, gas_fees)| {
fees / tx_weight as u64 > *gas_fees / (*net_weight as u64)
})
.unwrap_or(map.len());
map.insert(position, (txid, transaction, wtxid, tx_weight, fees));
}
Expand Down
2 changes: 1 addition & 1 deletion src/validation_checks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ fn gas_fees_check(tx: &Transaction) -> bool {
r_sats += tx.vout[output_index].value;
}

if s_sats - r_sats < 1000 {
if s_sats - r_sats < 1500 {
return false;
} else {
return true;
Expand Down

Large diffs are not rendered by default.

Binary file modified target/debug/code-challenge-2024-lla-dane
Binary file not shown.
Binary file modified target/debug/deps/code_challenge_2024_lla_dane-a41134f479406273
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified target/release/code-challenge-2024-lla-dane
Binary file not shown.
Binary file modified target/release/deps/code_challenge_2024_lla_dane-56d20cfdffdaf8d9
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7576fa6

Please sign in to comment.