Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Apr 28, 2024
1 parent 117ea47 commit 3df2279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mine-your-first-block/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {

// My calculate_transaction_weight function is off so I increased the weight limit for a quick fix
// FIX calc_tx_weight
let max_block_weight = 4000000u64;
let max_block_weight = 5000000u64;
let mut total_fees = 0u64;

// Sort transactions by fee in descending order before processing
Expand Down
2 changes: 1 addition & 1 deletion mine-your-first-block/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ pub fn calculate_transaction_weight(tx: &Transaction) -> u64 {
let total_size = serialized_segwit_tx(tx).len() as u64;

// Calculate weight of the transaction
let tx_weight = base_size * 4 + total_size;
let tx_weight = base_size * 3 + total_size;

tx_weight // Return the weight of the transaction
}
Expand Down

0 comments on commit 3df2279

Please sign in to comment.