[accelerator] check for high sigops
This commit is contained in:
parent
e35ac6e1a2
commit
5067c88642
@ -743,7 +743,8 @@ export class TrackerComponent implements OnInit, OnDestroy {
|
||||
if (this.tx) {
|
||||
this.tx.flags = getTransactionFlags(this.tx);
|
||||
const replaceableInputs = (this.tx.flags & (TransactionFlags.sighash_none | TransactionFlags.sighash_acp)) > 0n;
|
||||
this.eligibleForAcceleration = !replaceableInputs;
|
||||
const highSigop = (this.tx.sigops * 20) > this.tx.weight;
|
||||
this.eligibleForAcceleration = !replaceableInputs && !highSigop;
|
||||
} else {
|
||||
this.eligibleForAcceleration = false;
|
||||
}
|
||||
|
@ -832,7 +832,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
checkAccelerationEligibility() {
|
||||
if (this.tx && this.tx.flags) {
|
||||
const replaceableInputs = (this.tx.flags & (TransactionFlags.sighash_none | TransactionFlags.sighash_acp)) > 0n;
|
||||
this.eligibleForAcceleration = !replaceableInputs;
|
||||
const highSigop = (this.tx.sigops * 20) > this.tx.weight;
|
||||
this.eligibleForAcceleration = !replaceableInputs && !highSigop;
|
||||
} else {
|
||||
this.eligibleForAcceleration = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user