mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
add mempool.emzy.de as another broadcaster
This commit is contained in:
parent
383594b03c
commit
c202a941b9
1 changed files with 16 additions and 0 deletions
|
@ -40,6 +40,22 @@ public enum BroadcastSource {
|
||||||
return postTransactionData(data);
|
return postTransactionData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected URL getURL(Proxy proxy) throws MalformedURLException {
|
||||||
|
if(Network.get() == Network.MAINNET) {
|
||||||
|
return new URL(getBaseUrl(proxy) + "/api/tx");
|
||||||
|
} else if(Network.get() == Network.TESTNET) {
|
||||||
|
return new URL(getBaseUrl(proxy) + "/testnet/api/tx");
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("Cannot broadcast transaction to " + getName() + " on network " + Network.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MEMPOOL_EMZY_DE("mempool.emzy.de", "https://mempool.emzy.de", "http://mempool4t6mypeemozyterviq3i5de4kpoua65r3qkn5i3kknu5l2cad.onion") {
|
||||||
|
public Sha256Hash broadcastTransaction(Transaction transaction) throws BroadcastException {
|
||||||
|
String data = Utils.bytesToHex(transaction.bitcoinSerialize());
|
||||||
|
return postTransactionData(data);
|
||||||
|
}
|
||||||
|
|
||||||
protected URL getURL(Proxy proxy) throws MalformedURLException {
|
protected URL getURL(Proxy proxy) throws MalformedURLException {
|
||||||
if(Network.get() == Network.MAINNET) {
|
if(Network.get() == Network.MAINNET) {
|
||||||
return new URL(getBaseUrl(proxy) + "/api/tx");
|
return new URL(getBaseUrl(proxy) + "/api/tx");
|
||||||
|
|
Loading…
Reference in a new issue