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 a023e88 commit cee9acd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mine-your-first-block/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ fn main() {
// Initializing block weight
let mut block_txs: Vec<TransactionForProcessing> = Vec::new();
let mut total_weight = 0u64;

// 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 = 7000000u64;
let max_block_weight = 4000000u64;
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,6 +459,6 @@ pub fn calculate_transaction_weight(tx: &Transaction) -> u64 {
// Calculate weight of the transaction
let tx_weight = base_size * 3 + total_size;

tx_weight // Return the weight of the transaction
tx_weight * 1.5 as u64 // Return the weight of the transaction
}

0 comments on commit cee9acd

Please sign in to comment.