Skip to content

Commit

Permalink
compute latest block on open
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Apr 3, 2024
1 parent 9ba4458 commit e5e94c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ public class SparrowChainSupplier implements ChainSupplier {

public SparrowChainSupplier(Integer storedBlockHeight) {
this.storedBlockHeight = AppServices.getCurrentBlockHeight() == null ? (storedBlockHeight != null ? storedBlockHeight : 0) : AppServices.getCurrentBlockHeight();
this.latestBlock = computeLatestBlock();
}

public void open() {
this.latestBlock = computeLatestBlock();
EventManager.get().register(this);
}

Expand Down

0 comments on commit e5e94c3

Please sign in to comment.