mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Display sigops on all transactions
This commit is contained in:
parent
a510b4992c
commit
4ac0a6dad2
3 changed files with 17 additions and 4 deletions
|
@ -292,9 +292,9 @@
|
||||||
<td i18n="transaction.vsize|Transaction Virtual Size">Virtual size</td>
|
<td i18n="transaction.vsize|Transaction Virtual Size">Virtual size</td>
|
||||||
<td [innerHTML]="'‎' + (tx.weight / 4 | vbytes: 2)"></td>
|
<td [innerHTML]="'‎' + (tx.weight / 4 | vbytes: 2)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngIf="cpfpInfo && cpfpInfo.adjustedVsize && cpfpInfo.adjustedVsize > (tx.weight / 4)">
|
<tr *ngIf="adjustedVsize != null">
|
||||||
<td i18n="transaction.adjusted-vsize|Transaction Adjusted VSize">Adjusted vsize</td>
|
<td i18n="transaction.adjusted-vsize|Transaction Adjusted VSize">Adjusted vsize</td>
|
||||||
<td [innerHTML]="'‎' + (cpfpInfo.adjustedVsize | vbytes: 2)"></td>
|
<td [innerHTML]="'‎' + (adjustedVsize | vbytes: 2)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td i18n="block.weight">Weight</td>
|
<td i18n="block.weight">Weight</td>
|
||||||
|
@ -314,9 +314,9 @@
|
||||||
<td i18n="transaction.locktime">Locktime</td>
|
<td i18n="transaction.locktime">Locktime</td>
|
||||||
<td [innerHTML]="'‎' + (tx.locktime | number)"></td>
|
<td [innerHTML]="'‎' + (tx.locktime | number)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngIf="cpfpInfo && cpfpInfo.adjustedVsize && cpfpInfo.adjustedVsize > (tx.weight / 4)">
|
<tr *ngIf="sigops != null">
|
||||||
<td i18n="transaction.sigops|Transaction Sigops">Sigops</td>
|
<td i18n="transaction.sigops|Transaction Sigops">Sigops</td>
|
||||||
<td [innerHTML]="'‎' + (cpfpInfo.sigops | number)"></td>
|
<td [innerHTML]="'‎' + (sigops | number)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td i18n="transaction.hex">Transaction hex</td>
|
<td i18n="transaction.hex">Transaction hex</td>
|
||||||
|
|
|
@ -62,6 +62,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
rbfReplaces: string[];
|
rbfReplaces: string[];
|
||||||
rbfInfo: RbfTree;
|
rbfInfo: RbfTree;
|
||||||
cpfpInfo: CpfpInfo | null;
|
cpfpInfo: CpfpInfo | null;
|
||||||
|
sigops: number | null;
|
||||||
|
adjustedVsize: number | null;
|
||||||
showCpfpDetails = false;
|
showCpfpDetails = false;
|
||||||
fetchCpfp$ = new Subject<string>();
|
fetchCpfp$ = new Subject<string>();
|
||||||
fetchRbfHistory$ = new Subject<string>();
|
fetchRbfHistory$ = new Subject<string>();
|
||||||
|
@ -343,6 +345,10 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
if (tx.fee === undefined) {
|
if (tx.fee === undefined) {
|
||||||
this.tx.fee = 0;
|
this.tx.fee = 0;
|
||||||
}
|
}
|
||||||
|
if (this.tx.sigops != null) {
|
||||||
|
this.sigops = this.tx.sigops;
|
||||||
|
this.adjustedVsize = Math.max(this.tx.weight / 4, this.sigops * 5);
|
||||||
|
}
|
||||||
this.tx.feePerVsize = tx.fee / (tx.weight / 4);
|
this.tx.feePerVsize = tx.fee / (tx.weight / 4);
|
||||||
this.isLoadingTx = false;
|
this.isLoadingTx = false;
|
||||||
this.error = undefined;
|
this.error = undefined;
|
||||||
|
@ -543,6 +549,10 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cpfpInfo = cpfpInfo;
|
this.cpfpInfo = cpfpInfo;
|
||||||
|
if (this.cpfpInfo.adjustedVsize && this.cpfpInfo.sigops != null) {
|
||||||
|
this.sigops = this.cpfpInfo.sigops;
|
||||||
|
this.adjustedVsize = this.cpfpInfo.adjustedVsize;
|
||||||
|
}
|
||||||
this.hasEffectiveFeeRate = hasRelatives || (this.tx.effectiveFeePerVsize && (Math.abs(this.tx.effectiveFeePerVsize - this.tx.feePerVsize) > 0.01));
|
this.hasEffectiveFeeRate = hasRelatives || (this.tx.effectiveFeePerVsize && (Math.abs(this.tx.effectiveFeePerVsize - this.tx.feePerVsize) > 0.01));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,6 +579,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
this.replaced = false;
|
this.replaced = false;
|
||||||
this.transactionTime = -1;
|
this.transactionTime = -1;
|
||||||
this.cpfpInfo = null;
|
this.cpfpInfo = null;
|
||||||
|
this.adjustedVsize = null;
|
||||||
|
this.sigops = null;
|
||||||
this.hasEffectiveFeeRate = false;
|
this.hasEffectiveFeeRate = false;
|
||||||
this.rbfInfo = null;
|
this.rbfInfo = null;
|
||||||
this.rbfReplaces = [];
|
this.rbfReplaces = [];
|
||||||
|
|
|
@ -26,6 +26,7 @@ export interface Transaction {
|
||||||
_outspends?: Outspend[];
|
_outspends?: Outspend[];
|
||||||
_channels?: TransactionChannels;
|
_channels?: TransactionChannels;
|
||||||
price?: Price;
|
price?: Price;
|
||||||
|
sigops?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TransactionChannels {
|
export interface TransactionChannels {
|
||||||
|
|
Loading…
Add table
Reference in a new issue