diff --git a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java index 9263d5622..9401d8d91 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java @@ -217,6 +217,15 @@ public class TransactionBroadcast { .thenApply(tx -> this); } + /** + * Wait for confirmation the transaction has been sent to a remote peer. (Or at least buffered to be sent to + * a peer.) + * @return A future that completes when the message has been relayed by the appropriate number of remote peers + */ + public CompletableFuture awaitSent() { + return sentFuture; + } + /** * If you migrate to {@link #broadcastAndAwaitRelay()} and need a {@link CompletableFuture} that returns * {@link Transaction} you can use: