diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index 1052330..9834cac 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -22,9 +22,10 @@ fn main() { // Initializing block weight let mut block_txs: Vec = 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 diff --git a/mine-your-first-block/src/validation.rs b/mine-your-first-block/src/validation.rs index 89a348b..82c41af 100644 --- a/mine-your-first-block/src/validation.rs +++ b/mine-your-first-block/src/validation.rs @@ -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 }