Skip to content

Commit

Permalink
fix: compatability with v25 sendrawtransaction
Browse files Browse the repository at this point in the history
In Bitcoin Core v25 sendrawtransaction was extended with an
optional maxburnamount argument. Some mainnet transactions need
this to be higher than the default (0 BTC). Use a custom
bitcoin-core-rpc crate branch for now until this is in upstream.
  • Loading branch information
0xB10C committed Dec 20, 2023
1 parent 9b8a920 commit 0225e58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bitcoincore-rpc = "0.18.0"
bitcoincore-rpc = { git="https://github.com/0xb10c/rust-bitcoincore-rpc", branch="2023-12-v25-sendrawtransaction" }
config = { version = "0.13.4", default-features = false, features = ["toml"] }
csv = "1.3.0"
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use bitcoincore_rpc::bitcoin::Amount;
use bitcoincore_rpc::{Auth, Client, RpcApi};
use config::Config;
use csv::Writer;
Expand Down Expand Up @@ -102,7 +103,9 @@ fn main() {
tx.output.len().to_string(),
]);
} else {
test_node.send_raw_transaction(tx).unwrap();
test_node
.send_raw_transaction(tx, Some(Amount::MAX_MONEY), Some(Amount::MAX_MONEY))
.unwrap();
}
}

Expand Down

0 comments on commit 0225e58

Please sign in to comment.