public class TransactionBroadcast extends Object
Wallet
and needs to be sent to the network. A broadcast can succeed or fail. A success is
defined as seeing the transaction be announced by peers via inv messages, thus indicating their acceptance. A failure
is defined as not reaching acceptance within a timeout period, or getting an explicit error message from peers
indicating that the transaction was not acceptable (this isn't currently implemented in v0.8 of the network protocol
but should be coming in 0.9).Modifier and Type | Field and Description |
---|---|
static Random |
random
Used for shuffling the peers before broadcast: unit tests can replace this to make themselves deterministic.
|
Constructor and Description |
---|
TransactionBroadcast(PeerGroup peerGroup,
Transaction tx) |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<Transaction> |
broadcast() |
ListenableFuture<Transaction> |
future() |
void |
setMinConnections(int minConnections) |
public static Random random
public TransactionBroadcast(PeerGroup peerGroup, Transaction tx)
public ListenableFuture<Transaction> future()
public void setMinConnections(int minConnections)
public ListenableFuture<Transaction> broadcast()
Copyright © 2014. All rights reserved.