Skip to content

Commit c478a9d

Browse files
committed
Leave state as ready on error
Getting block is a periodical task. Even if it faces error it will run after.
1 parent 8f8bbc7 commit c478a9d

File tree

1 file changed

+2
-4
lines changed
  • ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/api/core

1 file changed

+2
-4
lines changed

ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/api/core/ApiRpcSyncer.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ class ApiRpcSyncer(
9595
rpcApiProvider.single(BlockNumberJsonRpc())
9696
.subscribeOn(Schedulers.io())
9797
.observeOn(Schedulers.io())
98-
.subscribe({ lastBlockNumber ->
98+
.subscribe { lastBlockNumber ->
9999
listener?.didUpdateLastBlockHeight(lastBlockNumber)
100-
}, {
101-
state = SyncerState.NotReady(it)
102-
}).let {
100+
}.let {
103101
disposables.add(it)
104102
}
105103
}

0 commit comments

Comments
 (0)