Fix transaction ETA calculation
This commit is contained in:
parent
2f0d4d6068
commit
3f49944c05
@ -416,13 +416,15 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
const txFeePerVSize =
|
const txFeePerVSize =
|
||||||
this.tx.effectiveFeePerVsize || this.tx.fee / (this.tx.weight / 4);
|
this.tx.effectiveFeePerVsize || this.tx.fee / (this.tx.weight / 4);
|
||||||
|
|
||||||
|
let found = false;
|
||||||
for (const block of mempoolBlocks) {
|
for (const block of mempoolBlocks) {
|
||||||
for (let i = 0; i < block.feeRange.length - 1; i++) {
|
for (let i = 0; i < block.feeRange.length - 1 && !found; i++) {
|
||||||
if (
|
if (
|
||||||
txFeePerVSize <= block.feeRange[i + 1] &&
|
txFeePerVSize <= block.feeRange[i + 1] &&
|
||||||
txFeePerVSize >= block.feeRange[i]
|
txFeePerVSize >= block.feeRange[i]
|
||||||
) {
|
) {
|
||||||
this.txInBlockIndex = mempoolBlocks.indexOf(block);
|
this.txInBlockIndex = mempoolBlocks.indexOf(block);
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user