mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 23:32:16 +00:00
Wallet: restrict visibility of the transactions map a bit and tag the others as visible for testing. This should get fixed up in a future refactor.
This commit is contained in:
parent
1e4f930b70
commit
9ca891c709
@ -33,6 +33,7 @@ import com.google.bitcoin.utils.ListenerRegistration;
|
|||||||
import com.google.bitcoin.utils.Threading;
|
import com.google.bitcoin.utils.Threading;
|
||||||
import com.google.bitcoin.wallet.*;
|
import com.google.bitcoin.wallet.*;
|
||||||
import com.google.bitcoin.wallet.WalletTransaction.Pool;
|
import com.google.bitcoin.wallet.WalletTransaction.Pool;
|
||||||
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.*;
|
import com.google.common.collect.*;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
import com.google.common.util.concurrent.ListenableFuture;
|
||||||
@ -124,13 +125,13 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
|
|||||||
// to the user in the UI, etc). A transaction can leave dead and move into spent/unspent if there is a
|
// to the user in the UI, etc). A transaction can leave dead and move into spent/unspent if there is a
|
||||||
// re-org to a chain that doesn't include the double spend.
|
// re-org to a chain that doesn't include the double spend.
|
||||||
|
|
||||||
final Map<Sha256Hash, Transaction> pending;
|
@VisibleForTesting final Map<Sha256Hash, Transaction> pending;
|
||||||
final Map<Sha256Hash, Transaction> unspent;
|
@VisibleForTesting final Map<Sha256Hash, Transaction> unspent;
|
||||||
final Map<Sha256Hash, Transaction> spent;
|
@VisibleForTesting final Map<Sha256Hash, Transaction> spent;
|
||||||
final Map<Sha256Hash, Transaction> dead;
|
@VisibleForTesting final Map<Sha256Hash, Transaction> dead;
|
||||||
|
|
||||||
// All transactions together.
|
// All transactions together.
|
||||||
final Map<Sha256Hash, Transaction> transactions;
|
protected final Map<Sha256Hash, Transaction> transactions;
|
||||||
|
|
||||||
// Transactions that were dropped by the risk analysis system. These are not in any pools and not serialized
|
// Transactions that were dropped by the risk analysis system. These are not in any pools and not serialized
|
||||||
// to disk. We have to keep them around because if we ignore a tx because we think it will never confirm, but
|
// to disk. We have to keep them around because if we ignore a tx because we think it will never confirm, but
|
||||||
@ -153,7 +154,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
|
|||||||
// A list of scripts watched by this wallet.
|
// A list of scripts watched by this wallet.
|
||||||
private Set<Script> watchedScripts;
|
private Set<Script> watchedScripts;
|
||||||
|
|
||||||
private final NetworkParameters params;
|
protected final NetworkParameters params;
|
||||||
|
|
||||||
@Nullable private Sha256Hash lastBlockSeenHash;
|
@Nullable private Sha256Hash lastBlockSeenHash;
|
||||||
private int lastBlockSeenHeight;
|
private int lastBlockSeenHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user