3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-16 04:05:50 +00:00

Mark receivePending(List<Tx> dependencies) @Nullable

This commit is contained in:
Matt Corallo 2013-07-11 14:20:23 +02:00 committed by Mike Hearn
parent 98787909da
commit a724bcada5
4 changed files with 4 additions and 4 deletions

View File

@ -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 * 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.</p> * transaction and any dependencies it has which are still in the memory pool.</p>
*/ */
public void receivePending(Transaction tx, List<Transaction> dependencies) throws VerificationException { public void receivePending(Transaction tx, @Nullable List<Transaction> dependencies) throws VerificationException {
receivePending(tx, dependencies, false); receivePending(tx, dependencies, false);
} }

View File

@ -244,7 +244,7 @@ public class PaymentChannelServerState {
try { try {
// Manually add the multisigContract to the wallet, overriding the isRelevant checks so we can track // Manually add the multisigContract to the wallet, overriding the isRelevant checks so we can track
// it and check for double-spends later // it and check for double-spends later
wallet.receivePending(multisigContract, Collections.EMPTY_LIST, true); wallet.receivePending(multisigContract, null, true);
} catch (VerificationException e) { } catch (VerificationException e) {
throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify() throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify()
} }

View File

@ -60,7 +60,7 @@ public class TestWithWallet {
if (type == null) { if (type == null) {
// Pending/broadcast tx. // Pending/broadcast tx.
if (wallet.isPendingTransactionRelevant(tx)) if (wallet.isPendingTransactionRelevant(tx))
wallet.receivePending(tx, new ArrayList<Transaction>()); wallet.receivePending(tx, null);
} else { } else {
TestUtils.BlockPair bp = createFakeBlock(blockStore, tx); TestUtils.BlockPair bp = createFakeBlock(blockStore, tx);
wallet.receiveFromBlock(tx, bp.storedBlock, type); wallet.receiveFromBlock(tx, bp.storedBlock, type);

View File

@ -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("1.2.3.4")));
t1.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByName("5.6.7.8"))); t1.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByName("5.6.7.8")));
t1.getConfidence().setSource(TransactionConfidence.Source.NETWORK); t1.getConfidence().setSource(TransactionConfidence.Source.NETWORK);
myWallet.receivePending(t1, new ArrayList<Transaction>()); myWallet.receivePending(t1, null);
Wallet wallet1 = roundTrip(myWallet); Wallet wallet1 = roundTrip(myWallet);
assertEquals(1, wallet1.getTransactions(true).size()); assertEquals(1, wallet1.getTransactions(true).size());
assertEquals(v1, wallet1.getBalance(Wallet.BalanceType.ESTIMATED)); assertEquals(v1, wallet1.getBalance(Wallet.BalanceType.ESTIMATED));