mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
compute latest block on open
This commit is contained in:
parent
9ba4458f48
commit
e5e94c3ea6
1 changed files with 1 additions and 1 deletions
|
@ -15,10 +15,10 @@ public class SparrowChainSupplier implements ChainSupplier {
|
||||||
|
|
||||||
public SparrowChainSupplier(Integer storedBlockHeight) {
|
public SparrowChainSupplier(Integer storedBlockHeight) {
|
||||||
this.storedBlockHeight = AppServices.getCurrentBlockHeight() == null ? (storedBlockHeight != null ? storedBlockHeight : 0) : AppServices.getCurrentBlockHeight();
|
this.storedBlockHeight = AppServices.getCurrentBlockHeight() == null ? (storedBlockHeight != null ? storedBlockHeight : 0) : AppServices.getCurrentBlockHeight();
|
||||||
this.latestBlock = computeLatestBlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
|
this.latestBlock = computeLatestBlock();
|
||||||
EventManager.get().register(this);
|
EventManager.get().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue