bitpay / bitcore-wallet-service

A multisig, HD Bitcoin and Bitcoin Cash wallet service. Used by Copay.
https://copay.io/
MIT License
621 stars 548 forks source link

getFeeLevels not polling bitcoind? #532

Open dabura667 opened 8 years ago

dabura667 commented 8 years ago

https://bws.bitpay.com/bws/api/v2/feelevels/

https://insight.bitpay.com/api/utils/estimatefee?nbBlocks=1 https://insight.bitpay.com/api/utils/estimatefee?nbBlocks=2 https://insight.bitpay.com/api/utils/estimatefee?nbBlocks=6 https://insight.bitpay.com/api/utils/estimatefee?nbBlocks=24

These values are completely different.

Looking at the source, it says if the estimate is < 0 it will pull from a cache... but the values for priority look like it's coming from nbBlocks=2 from insight???

I was very confused, unless your BWS is polling a separate insight other than the public one.

isocolsky commented 8 years ago

Thank you for reporting.

unless your BWS is polling a separate insight other than the public one

Yes, BitPay's BWS is using its own Insight instance. So some discrepancy on fee levels is expected (shouldn't be that different anyways). Related to this issue, please take a look at #534. It contains several improvements to the current fee estimation algorithm and should be more robust especially under network congestion.