[bisq-network/bisq] Refactor fee estimation (#2251)

Manfred Karrer notifications at github.com
Mon Jan 14 14:10:58 UTC 2019


ManfredKarrer commented on this pull request.



> +        BtcWalletService btcWalletService = mock(BtcWalletService.class);
+        int result;
+        int realTxSize;
+        Coin txFee;
+
+        initialEstimatedTxSize = 260;
+        txFeePerByte = Coin.valueOf(10);
+        realTxSize = 260;
+
+        txFee = txFeePerByte.multiply(initialEstimatedTxSize);
+        when(btcWalletService.getEstimatedFeeTxSize(outputValues, txFee)).thenReturn(realTxSize);
+        result = TxFeeEstimationService.getEstimatedTxSize(outputValues, initialEstimatedTxSize, txFeePerByte, btcWalletService);
+        assertEquals(260, result);
+
+
+        // TODO check how to use the mocking framework for repeated calls

@blabno I broke them up in https://github.com/bisq-network/bisq/pull/2251/commits/877d0ae3acb2a1ea94e389f99cbd0194ebae6aee and looked again into it. See commit comments... Could u have a look to try to fix it?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2251#discussion_r247504672
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190114/824fe013/attachment-0001.html>


More information about the bisq-github mailing list