@Test public void testReplayBlocksDescendingFlowable() throws Exception { List<AppBlock> appBlocks = Arrays.asList(createBlock(2), createBlock(1), createBlock(0)); OngoingStubbing<AppBlock> stubbing = when(CITAjService.send(any(Request.class), eq(AppBlock.class))); for (AppBlock appBlock : appBlocks) { stubbing = stubbing.thenReturn(appBlock); } Flowable<AppBlock> flowable = citaj.replayBlocksFlowable( new DefaultBlockParameterNumber(BigInteger.ZERO), new DefaultBlockParameterNumber(BigInteger.valueOf(2)), false, false); CountDownLatch transactionLatch = new CountDownLatch(appBlocks.size()); CountDownLatch completedLatch = new CountDownLatch(1); List<AppBlock> results = new ArrayList<>(appBlocks.size()); Disposable subscription = flowable.subscribe( result -> { results.add(result); transactionLatch.countDown(); }, throwable -> fail(throwable.getMessage()), () -> completedLatch.countDown()); transactionLatch.await(1, TimeUnit.SECONDS); assertThat(results, equalTo(appBlocks)); subscription.dispose(); completedLatch.await(1, TimeUnit.SECONDS); assertTrue(subscription.isDisposed()); }
public Flowable<AppBlock> replayBlocksFlowable( DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects) { return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true); }
JsonRpc2_0Rx { public Flowable<AppBlock> replayBlocksFlowable( DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects) { return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true); } }
JsonRpc2_0Rx { public Flowable<AppBlock> replayBlocksFlowable( DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects) { return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true); } JsonRpc2_0Rx(CITAj citaj, ScheduledExecutorService scheduledExecutorService); }
JsonRpc2_0Rx { public Flowable<AppBlock> replayBlocksFlowable( DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects) { return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true); } JsonRpc2_0Rx(CITAj citaj, ScheduledExecutorService scheduledExecutorService); Flowable<String> appBlockHashFlowable(long pollingInterval); Flowable<String> appPendingTransactionHashFlowable(long pollingInterval); Flowable<Log> appLogFlowable(AppFilter appFilter, long pollingInterval); Flowable<Transaction> transactionFlowable(long pollingInterval); Flowable<Transaction> pendingTransactionFlowable(long pollingInterval); Flowable<AppBlock> blockFlowable(
            boolean fullTransactionObjects, long pollingInterval); Flowable<AppBlock> replayBlocksFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects); Flowable<AppBlock> replayBlocksFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects, boolean ascending); Flowable<Transaction> replayTransactionsFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock); Flowable<AppBlock> catchUpToLatestBlockFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            Flowable<AppBlock> onCompleteFlowable); Flowable<AppBlock> catchUpToLatestBlockFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); Flowable<Transaction> catchUpToLatestTransactionFlowable(
            DefaultBlockParameter startBlock); Flowable<AppBlock> catchUpToLatestAndSubscribeToNewBlocksFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            long pollingInterval); Flowable<Transaction> catchUpToLatestAndSubscribeToNewTransactionsFlowable(
            DefaultBlockParameter startBlock, long pollingInterval); }
JsonRpc2_0Rx { public Flowable<AppBlock> replayBlocksFlowable( DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects) { return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true); } JsonRpc2_0Rx(CITAj citaj, ScheduledExecutorService scheduledExecutorService); Flowable<String> appBlockHashFlowable(long pollingInterval); Flowable<String> appPendingTransactionHashFlowable(long pollingInterval); Flowable<Log> appLogFlowable(AppFilter appFilter, long pollingInterval); Flowable<Transaction> transactionFlowable(long pollingInterval); Flowable<Transaction> pendingTransactionFlowable(long pollingInterval); Flowable<AppBlock> blockFlowable(
            boolean fullTransactionObjects, long pollingInterval); Flowable<AppBlock> replayBlocksFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects); Flowable<AppBlock> replayBlocksFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects, boolean ascending); Flowable<Transaction> replayTransactionsFlowable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock); Flowable<AppBlock> catchUpToLatestBlockFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            Flowable<AppBlock> onCompleteFlowable); Flowable<AppBlock> catchUpToLatestBlockFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); Flowable<Transaction> catchUpToLatestTransactionFlowable(
            DefaultBlockParameter startBlock); Flowable<AppBlock> catchUpToLatestAndSubscribeToNewBlocksFlowable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            long pollingInterval); Flowable<Transaction> catchUpToLatestAndSubscribeToNewTransactionsFlowable(
            DefaultBlockParameter startBlock, long pollingInterval);  }