Fix ETA calculation error
This commit is contained in:
parent
c13b8029d3
commit
68a580466f
@ -166,7 +166,7 @@ export class EtaService {
|
|||||||
pools[pool.poolUniqueId] = pool;
|
pools[pool.poolUniqueId] = pool;
|
||||||
}
|
}
|
||||||
const unacceleratedPosition = this.mempoolPositionFromFees(getUnacceleratedFeeRate(tx, true), mempoolBlocks);
|
const unacceleratedPosition = this.mempoolPositionFromFees(getUnacceleratedFeeRate(tx, true), mempoolBlocks);
|
||||||
const totalAcceleratedHashrate = accelerationPositions.reduce((total, pos) => total + (pools[pos.poolId].lastEstimatedHashrate), 0);
|
const totalAcceleratedHashrate = accelerationPositions.reduce((total, pos) => total + (pools[pos.poolId]?.lastEstimatedHashrate || 0), 0);
|
||||||
const shares = [
|
const shares = [
|
||||||
{
|
{
|
||||||
block: unacceleratedPosition.block,
|
block: unacceleratedPosition.block,
|
||||||
@ -174,7 +174,7 @@ export class EtaService {
|
|||||||
},
|
},
|
||||||
...accelerationPositions.map(pos => ({
|
...accelerationPositions.map(pos => ({
|
||||||
block: pos.block,
|
block: pos.block,
|
||||||
hashrateShare: ((pools[pos.poolId].lastEstimatedHashrate) / miningStats.lastEstimatedHashrate)
|
hashrateShare: ((pools[pos.poolId]?.lastEstimatedHashrate || 0) / miningStats.lastEstimatedHashrate)
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
return this.calculateETAFromShares(shares, da);
|
return this.calculateETAFromShares(shares, da);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user