Adjust fee estimation to avoid risk for unconfirmed txs. Reduce maxBlocks from 20 to 15 and change timespan for average from 1 hour to 30 min.

This commit is contained in:
Manfred Karrer 2017-12-07 13:00:56 -05:00
parent 43fc8eb365
commit b348255be9
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -14,8 +14,8 @@ import java.util.LinkedList;
//TODO consider alternative https://www.bitgo.com/api/v1/tx/fee?numBlocks=3
@Slf4j
public class BtcFeesProvider {
static int CAPACITY = 12; // we request each 5 min. so we take average of last hour
static int MAX_BLOCKS = 20;
static int CAPACITY = 6; // we request each 5 min. so we take average of last 30 min.
static int MAX_BLOCKS = 15;
private final HttpClient httpClient;
LinkedList<Long> fees = new LinkedList<>();