Fix accelerated fee rate again
This commit is contained in:
		
							parent
							
								
									1082889b64
								
							
						
					
					
						commit
						f3864c9100
					
				| @ -366,7 +366,7 @@ export class BlockComponent implements OnInit, OnDestroy { | |||||||
|         if (acceleratedInBlock[tx.txid]) { |         if (acceleratedInBlock[tx.txid]) { | ||||||
|           tx.acc = true; |           tx.acc = true; | ||||||
|           const acceleration = acceleratedInBlock[tx.txid]; |           const acceleration = acceleratedInBlock[tx.txid]; | ||||||
|           const boostCost = acceleration.boostCost || (acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee); |           const boostCost = acceleration.boostCost || acceleration.bidBoost; | ||||||
|           const acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; |           const acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; | ||||||
|           if (acceleratedFeeRate > tx.rate) { |           if (acceleratedFeeRate > tx.rate) { | ||||||
|             tx.rate = acceleratedFeeRate; |             tx.rate = acceleratedFeeRate; | ||||||
|  | |||||||
| @ -263,7 +263,7 @@ export class TrackerComponent implements OnInit, OnDestroy { | |||||||
|     ).subscribe((accelerationHistory) => { |     ).subscribe((accelerationHistory) => { | ||||||
|       for (const acceleration of accelerationHistory) { |       for (const acceleration of accelerationHistory) { | ||||||
|         if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) { |         if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) { | ||||||
|           const boostCost = acceleration.boostCost || (acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee); |           const boostCost = acceleration.boostCost || acceleration.bidBoost; | ||||||
|           acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; |           acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; | ||||||
|           acceleration.boost = boostCost; |           acceleration.boost = boostCost; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -294,7 +294,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|     ).subscribe((accelerationHistory) => { |     ).subscribe((accelerationHistory) => { | ||||||
|       for (const acceleration of accelerationHistory) { |       for (const acceleration of accelerationHistory) { | ||||||
|         if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) { |         if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) { | ||||||
|           const boostCost = acceleration.boostCost || (acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee); |           const boostCost = acceleration.boostCost || acceleration.bidBoost; | ||||||
|           acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; |           acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; | ||||||
|           acceleration.boost = boostCost; |           acceleration.boost = boostCost; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -396,7 +396,7 @@ export interface Acceleration { | |||||||
| 
 | 
 | ||||||
|   acceleratedFeeRate?: number; |   acceleratedFeeRate?: number; | ||||||
|   boost?: number; |   boost?: number; | ||||||
| 
 |   bidBoost?: number; | ||||||
|   boostCost?: number; |   boostCost?: number; | ||||||
|   boostRate?: number; |   boostRate?: number; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user