Skip to content

Commit

Permalink
fix: use 10000 BTC as max fee
Browse files Browse the repository at this point in the history
MAX_MONEY is, presumably, to large for Bitcoin Core to parse.
  • Loading branch information
0xB10C committed Jan 17, 2024
1 parent cca691e commit 27d1f58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use std::time;
const DUPLICATE_BLOCK_ERROR: &str = "\"duplicate\"";
const TX_ALREADY_IN_MEMPOOL_REJECTION_REASON: &str = "txn-already-in-mempool";
const RPC_TIMEOUT: time::Duration = time::Duration::from_secs(60 * 5); // 5 minutes
const MAX_FEE: Amount = Amount::from_int_btc(10000);

fn rpc_client(settings: &Config, node: &str) -> Client {
let rpc_url = &format!(
Expand Down Expand Up @@ -108,7 +109,7 @@ fn main() {
}

let results = test_node
.test_mempool_accept(&[tx], Some(Amount::MAX_MONEY))
.test_mempool_accept(&[tx], Some(MAX_FEE))
.unwrap();
let result = results.first().unwrap();

Expand Down Expand Up @@ -137,7 +138,7 @@ fn main() {
});
} else {
test_node
.send_raw_transaction(tx, Some(Amount::MAX_MONEY), Some(Amount::MAX_MONEY))
.send_raw_transaction(tx, Some(MAX_FEE), Some(MAX_FEE))
.expect(&format!("Could not send raw transaction {}", tx.txid()));
}
}
Expand Down

0 comments on commit 27d1f58

Please sign in to comment.