Display sigops & adjusted vsize in transaction page details

This commit is contained in:
Mononaut 2023-05-29 17:19:22 -04:00
parent 09e4e44e88
commit ec63c822db
No known key found for this signature in database
GPG key ID: A3F058E41374C04E
3 changed files with 12 additions and 0 deletions

View file

@ -211,6 +211,8 @@ class BitcoinRoutes {
bestDescendant: tx.bestDescendant || null, bestDescendant: tx.bestDescendant || null,
descendants: tx.descendants || null, descendants: tx.descendants || null,
effectiveFeePerVsize: tx.effectiveFeePerVsize || null, effectiveFeePerVsize: tx.effectiveFeePerVsize || null,
sigops: tx.sigops,
adjustedVsize: tx.adjustedVsize,
}); });
return; return;
} }

View file

@ -271,6 +271,10 @@
<td i18n="transaction.vsize|Transaction Virtual Size">Virtual size</td> <td i18n="transaction.vsize|Transaction Virtual Size">Virtual size</td>
<td [innerHTML]="'&lrm;' + (tx.weight / 4 | vbytes: 2)"></td> <td [innerHTML]="'&lrm;' + (tx.weight / 4 | vbytes: 2)"></td>
</tr> </tr>
<tr *ngIf="cpfpInfo && cpfpInfo.adjustedVsize && cpfpInfo.adjustedVsize > (tx.weight / 4)">
<td i18n="transaction.adjusted-vsize|Transaction Adjusted VSize">Adjusted vsize</td>
<td [innerHTML]="'&lrm;' + (cpfpInfo.adjustedVsize | vbytes: 2)"></td>
</tr>
<tr> <tr>
<td i18n="block.weight">Weight</td> <td i18n="block.weight">Weight</td>
<td [innerHTML]="'&lrm;' + (tx.weight | wuBytes: 2)"></td> <td [innerHTML]="'&lrm;' + (tx.weight | wuBytes: 2)"></td>
@ -289,6 +293,10 @@
<td i18n="transaction.locktime">Locktime</td> <td i18n="transaction.locktime">Locktime</td>
<td [innerHTML]="'&lrm;' + (tx.locktime | number)"></td> <td [innerHTML]="'&lrm;' + (tx.locktime | number)"></td>
</tr> </tr>
<tr *ngIf="cpfpInfo && cpfpInfo.adjustedVsize && cpfpInfo.adjustedVsize > (tx.weight / 4)">
<td i18n="transaction.sigops|Transaction Sigops">Sigops</td>
<td [innerHTML]="'&lrm;' + (cpfpInfo.sigops | number)"></td>
</tr>
<tr> <tr>
<td i18n="transaction.hex">Transaction hex</td> <td i18n="transaction.hex">Transaction hex</td>
<td><a target="_blank" href="{{ network === '' ? '' : '/' + network }}/api/tx/{{ txId }}/hex"><fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true"></fa-icon></a></td> <td><a target="_blank" href="{{ network === '' ? '' : '/' + network }}/api/tx/{{ txId }}/hex"><fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true"></fa-icon></a></td>

View file

@ -25,6 +25,8 @@ export interface CpfpInfo {
descendants?: Ancestor[]; descendants?: Ancestor[];
bestDescendant?: BestDescendant | null; bestDescendant?: BestDescendant | null;
effectiveFeePerVsize?: number; effectiveFeePerVsize?: number;
sigops?: number;
adjustedVsize?: number;
} }
export interface RbfInfo { export interface RbfInfo {