diff --git a/core/src/main/java/org/bitcoinj/core/Context.java b/core/src/main/java/org/bitcoinj/core/Context.java index 1f65af76f..931aec06e 100644 --- a/core/src/main/java/org/bitcoinj/core/Context.java +++ b/core/src/main/java/org/bitcoinj/core/Context.java @@ -61,6 +61,15 @@ public class Context { this(DEFAULT_EVENT_HORIZON, Transaction.DEFAULT_TX_FEE, true); } + /** + * Note that NetworkParameters have been removed from this class. Thus, this constructor just swallows them. + * @deprecated Use {@link Context#Context()} + */ + @Deprecated + public Context(NetworkParameters params) { + this(); + } + /** * Creates a new custom context object. This is mainly meant for unit tests for now. * @@ -77,6 +86,15 @@ public class Context { lastConstructed = this; } + /** + * Note that NetworkParameters have been removed from this class. Thus, this constructor just swallows them. + * @deprecated Use {@link Context#Context(int, Coin, boolean)} + */ + @Deprecated + public Context(NetworkParameters params, int eventHorizon, Coin feePerKb, boolean ensureMinRequiredFee) { + this(eventHorizon, feePerKb, ensureMinRequiredFee); + } + private static volatile Context lastConstructed; private static boolean isStrictMode; private static final ThreadLocal slot = new ThreadLocal<>(); @@ -136,6 +154,15 @@ public class Context { return context; } + /** + * Note that NetworkParameters have been removed from this class. Thus, this method just swallows them. + * @deprecated Use {@link Context#getOrCreate()} + */ + @Deprecated + public static Context getOrCreate(NetworkParameters params) { + return getOrCreate(); + } + /** * Sets the given context as the current thread context. You should use this if you create your own threads that * want to create core BitcoinJ objects. Generally, if a class can accept a Context in its constructor and might