Skip to content

Commit

Permalink
bitcoind: Add maxburnamount to sendrawtransaction
Browse files Browse the repository at this point in the history
This option was added in Bitcoin Core 25.0.
  • Loading branch information
alvasw committed Sep 3, 2024
1 parent f0eb997 commit b428662
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ private static List<String> listWalletsWithRpcClient(JsonRpcClient rpcClient) {
}

public String sendRawTransaction(String hexString) {
var request = new BitcoindSendRawTransactionRpcCall.Request(hexString);
return sendRawTransaction(hexString, null);
}

public String sendRawTransaction(String hexString, String maxBurnAmount) {
var request = new BitcoindSendRawTransactionRpcCall.Request(hexString, maxBurnAmount);
var rpcCall = new BitcoindSendRawTransactionRpcCall(request);
return rpcClient.call(rpcCall).getResult();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ public class BitcoindSendRawTransactionRpcCall extends DaemonRpcCall<BitcoindSen
public static final class Request {
@Json(name = "hexstring")
private final String hexString;
@Json(name = "maxburnamount")
private final String maxBurnAmount;

public Request(String hexString) {
public Request(String hexString, String maxBurnAmount) {
this.hexString = hexString;
this.maxBurnAmount = maxBurnAmount;
}
}

Expand Down

0 comments on commit b428662

Please sign in to comment.