From 3127c55c5b5fc3d80487a494d2d1add0f4c722ed Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 23 Apr 2015 16:14:21 +0200 Subject: [PATCH] Propagate contexts in a couple of places --- client/src/main/java/lighthouse/Main.java | 2 ++ .../main/java/lighthouse/subwindows/PledgeUploadWindow.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/client/src/main/java/lighthouse/Main.java b/client/src/main/java/lighthouse/Main.java index 1847775..eeee345 100644 --- a/client/src/main/java/lighthouse/Main.java +++ b/client/src/main/java/lighthouse/Main.java @@ -485,7 +485,9 @@ public static void restart() { } public static void restartBitcoinJ(DeterministicSeed seed) { + Context ctx = Context.get(); new Thread(() -> { + Context.propagate(ctx); Main.bitcoin.stopAsync(); Main.bitcoin.awaitTerminated(); uncheck(() -> Main.instance.initBitcoin(seed)); diff --git a/client/src/main/java/lighthouse/subwindows/PledgeUploadWindow.java b/client/src/main/java/lighthouse/subwindows/PledgeUploadWindow.java index 0815045..4539b13 100644 --- a/client/src/main/java/lighthouse/subwindows/PledgeUploadWindow.java +++ b/client/src/main/java/lighthouse/subwindows/PledgeUploadWindow.java @@ -10,6 +10,7 @@ import lighthouse.protocol.*; import lighthouse.utils.*; import lighthouse.wallet.*; +import org.bitcoinj.core.*; import org.slf4j.*; import java.io.*; @@ -43,10 +44,12 @@ public static void open(Project project, PledgingWallet.PendingPledge pledge, Ru } private void startUpload(Project project, PledgingWallet.PendingPledge pledge) { + Context ctx = Context.get(); uploadTask = new Task() { @Override protected Void call() throws Exception { try { + Context.propagate(ctx); URI url = project.getPaymentURL(); checkState(url != null); log.info("Uploading pledge to {}", url);