diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index aea7a0b7..18c0ba6a 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -713,7 +713,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi * called to decide whether the wallet cares about the transaction - if it does, then this method expects the * transaction and any dependencies it has which are still in the memory pool.

*/ - public void receivePending(Transaction tx, List dependencies) throws VerificationException { + public void receivePending(Transaction tx, @Nullable List dependencies) throws VerificationException { receivePending(tx, dependencies, false); } diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java b/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java index 776717d8..ac9e2bc9 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java +++ b/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java @@ -244,7 +244,7 @@ public class PaymentChannelServerState { try { // Manually add the multisigContract to the wallet, overriding the isRelevant checks so we can track // it and check for double-spends later - wallet.receivePending(multisigContract, Collections.EMPTY_LIST, true); + wallet.receivePending(multisigContract, null, true); } catch (VerificationException e) { throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify() } diff --git a/core/src/test/java/com/google/bitcoin/core/TestWithWallet.java b/core/src/test/java/com/google/bitcoin/core/TestWithWallet.java index 8bed75eb..31bfd4be 100644 --- a/core/src/test/java/com/google/bitcoin/core/TestWithWallet.java +++ b/core/src/test/java/com/google/bitcoin/core/TestWithWallet.java @@ -60,7 +60,7 @@ public class TestWithWallet { if (type == null) { // Pending/broadcast tx. if (wallet.isPendingTransactionRelevant(tx)) - wallet.receivePending(tx, new ArrayList()); + wallet.receivePending(tx, null); } else { TestUtils.BlockPair bp = createFakeBlock(blockStore, tx); wallet.receiveFromBlock(tx, bp.storedBlock, type); diff --git a/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java b/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java index 1a20afd8..60db8fce 100644 --- a/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java +++ b/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java @@ -65,7 +65,7 @@ public class WalletProtobufSerializerTest { t1.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByName("1.2.3.4"))); t1.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByName("5.6.7.8"))); t1.getConfidence().setSource(TransactionConfidence.Source.NETWORK); - myWallet.receivePending(t1, new ArrayList()); + myWallet.receivePending(t1, null); Wallet wallet1 = roundTrip(myWallet); assertEquals(1, wallet1.getTransactions(true).size()); assertEquals(v1, wallet1.getBalance(Wallet.BalanceType.ESTIMATED));