Skip to content

Commit

Permalink
OmniCoreClient, RichListService updates as Publisher not Flowable
Browse files Browse the repository at this point in the history
Use the more generic type. Partly in preparation for new ConsensusJ.
  • Loading branch information
msgilligan committed Sep 28, 2023
1 parent 0cea79e commit 92efe73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.consensusj.analytics.service.TokenRichList;
import org.consensusj.analytics.util.collector.LargestSliceCollector;
import org.consensusj.analytics.util.collector.LargestSliceList;
import org.reactivestreams.Publisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -66,7 +67,7 @@ public Single<TokenRichList<N, ID>> richList(ID currencyID, int numEntries) {
* @return An {@code Observable} to subscribe to for a stream of rich list updates
*/
@Override
public Flowable<TokenRichList<N, ID>> richListUpdates(ID currencyID, int numEntries) {
public Publisher<TokenRichList<N, ID>> richListUpdates(ID currencyID, int numEntries) {
boolean usingOmniwalletClient = false;

if (!usingOmniwalletClient || !currencyID.equals(CurrencyID.USDT)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import foundation.omni.OmniDivisibleValue;
import foundation.omni.OmniValue;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Single;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network;
Expand Down Expand Up @@ -261,7 +260,7 @@ public Single<TokenRichList<OmniValue, CurrencyID>> richList(CurrencyID id, int
}

@Override
public Flowable<TokenRichList<OmniValue, CurrencyID>> richListUpdates(CurrencyID id, int n) {
public Publisher<TokenRichList<OmniValue, CurrencyID>> richListUpdates(CurrencyID id, int n) {
return client.pollOnNewBlock(() -> client.omniProxyGetRichListSync(id, n));
}

Expand Down

0 comments on commit 92efe73

Please sign in to comment.