mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-14 11:15:51 +00:00
Wallet: make last seen block height default to zero not -1
This commit is contained in:
parent
d92314dd18
commit
5b78601b4a
@ -115,7 +115,7 @@ public class Wallet implements Serializable, BlockChainListener {
|
|||||||
private final NetworkParameters params;
|
private final NetworkParameters params;
|
||||||
|
|
||||||
private Sha256Hash lastBlockSeenHash;
|
private Sha256Hash lastBlockSeenHash;
|
||||||
private int lastBlockSeenHeight = -1;
|
private int lastBlockSeenHeight;
|
||||||
|
|
||||||
private transient CopyOnWriteArrayList<ListenerRegistration<WalletEventListener>> eventListeners;
|
private transient CopyOnWriteArrayList<ListenerRegistration<WalletEventListener>> eventListeners;
|
||||||
|
|
||||||
@ -2571,7 +2571,10 @@ public class Wallet implements Serializable, BlockChainListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the height of the last seen best-chain block. Can be -1 if a wallet is old and doesn't have that data. */
|
/**
|
||||||
|
* Returns the height of the last seen best-chain block. Can be 0 if a wallet is brand new or -1 if the wallet
|
||||||
|
* is old and doesn't have that data.
|
||||||
|
*/
|
||||||
public int getLastBlockSeenHeight() {
|
public int getLastBlockSeenHeight() {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user