[bisq-network/bisq] Start pricenode providers asynchronously (#4890)

James Cox notifications at github.com
Thu Dec 3 20:57:34 CET 2020


Fixes #4441

This guarantees that the pricenode will run even when there is a problem with a provider at startup.  It simply calls the initial `refresh()` asynchronously rather than blocking the bean startup routine.  To my point of view there is no difference between the first and subsequent calls to refresh, since providers can fail at any time.  When rates are requested any non-initialized provider is ignored.  

However I have not taken ownership of the pricenode and only have a superficial understanding of how the data is calculated.  I did enough testing to check that the price and fee data looks good, and that the automated tests pass.  There could certainly be edge cases that I'm not aware of.  @cd2357 is certainly free to flame me if this is a stupid change, as he put a lot more work into it than I did.

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4890

-- Commit Summary --

  * Start pricenode providers asynchronously

-- File Changes --

    M pricenode/src/main/java/bisq/price/PriceProvider.java (15)
    M pricenode/src/main/java/bisq/price/mining/FeeRateService.java (8)
    M pricenode/src/main/java/bisq/price/spot/ExchangeRateService.java (4)
    M pricenode/src/test/java/bisq/price/mining/providers/MempoolFeeRateProviderTest.java (3)
    M pricenode/src/test/java/bisq/price/spot/ExchangeRateServiceTest.java (3)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4890.patch
https://github.com/bisq-network/bisq/pull/4890.diff

-- 
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/4890
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201203/2b370ef8/attachment-0001.htm>


More information about the bisq-github mailing list