use of com.neemre.btcdcli4j.core.domain.Transaction in project bisq-core by bisq-network.
the class RpcService method requestFees.
public void requestFees(String txId, int blockHeight, Map<Integer, Long> feesByBlock) throws BsqBlockchainException {
try {
Transaction transaction = requestTx(txId);
final BigDecimal fee = transaction.getFee();
if (fee != null)
feesByBlock.put(blockHeight, Math.abs(fee.multiply(BigDecimal.valueOf(Coin.COIN.value)).longValue()));
} catch (BitcoindException | CommunicationException e) {
log.error("error at requestFees with txId={}, blockHeight={}", txId, blockHeight);
throw new BsqBlockchainException(e.getMessage(), e);
}
}
Aggregations