Skip to content

Commit

Permalink
commit before fetch upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Apr 29, 2024
1 parent 7425517 commit b8514cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions mine-your-first-block/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ 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 = 4000000u64;
let mut total_fees = 0u64;

Expand Down
3 changes: 2 additions & 1 deletion mine-your-first-block/src/validation.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::transactions::{Transaction, Vout, TransactionForProcessing};
use crate::transactions::{Transaction, TransactionForProcessing};
use std::io;
use std::time::{SystemTime, UNIX_EPOCH};
extern crate secp256k1;
Expand Down Expand Up @@ -389,6 +389,7 @@ pub fn p2pkh_script_validation(transaction: &mut Transaction) -> Result<(bool, S
}


// Helper functions to weed out bad transactions.
/// Function to get the tx amount so
pub fn verify_tx_fee(transaction: &Transaction) -> u64 {
let total_input_amount: u64 = transaction.vin.iter()
Expand Down

0 comments on commit b8514cb

Please sign in to comment.