fix potential npe on transaction entry tooltip

This commit is contained in:
Craig Raw
2026-05-22 10:28:17 +02:00
parent da476c9d77
commit 87af1ed9f5
@@ -245,8 +245,11 @@ public class TransactionEntry extends Entry implements Comparable<TransactionEnt
public Long getVSizeFromTip() {
if(!AppServices.getMempoolHistogram().isEmpty()) {
Double feeRate = blockTransaction.getFeeRate();
if(feeRate == null) {
return null;
}
Set<MempoolRateSize> rateSizes = AppServices.getMempoolHistogram().get(AppServices.getMempoolHistogram().lastKey());
double feeRate = blockTransaction.getFeeRate();
return rateSizes.stream().filter(rateSize -> rateSize.getFee() > feeRate).mapToLong(MempoolRateSize::getVSize).sum();
}