ForwardingService: fix context not initialized
@@ -21,6 +21,7 @@ import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.Address;
import org.bitcoinj.base.Coin;
+import org.bitcoinj.core.Context;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.LegacyAddress;
import org.bitcoinj.core.NetworkParameters;
@@ -49,6 +50,8 @@ public class ForwardingService {
public static void main(String[] args) throws Exception {
// This line makes the log output more compact and easily read, especially when using the JDK log adapter.
BriefLogFormatter.init();
+ Context.propagate(new Context());
+
if (args.length < 1) {
System.err.println("Usage: address-to-send-back-to [mainnet|testnet|signet|regtest]");
return;
