Fix dust limit for undefined witness program outputs
This commit is contained in:
parent
98e9d1a6c3
commit
425edb9b9f
@ -292,7 +292,7 @@ export class Common {
|
|||||||
dustSize += getVarIntLength(dustSize);
|
dustSize += getVarIntLength(dustSize);
|
||||||
// add value size
|
// add value size
|
||||||
dustSize += 8;
|
dustSize += 8;
|
||||||
if (['v0_p2wpkh', 'v0_p2wsh', 'v1_p2tr'].includes(vout.scriptpubkey_type)) {
|
if (Common.isWitnessProgram(vout.scriptpubkey)) {
|
||||||
dustSize += 67;
|
dustSize += 67;
|
||||||
} else {
|
} else {
|
||||||
dustSize += 148;
|
dustSize += 148;
|
||||||
|
@ -181,7 +181,7 @@ export function isNonStandard(tx: Transaction): boolean {
|
|||||||
dustSize += getVarIntLength(dustSize);
|
dustSize += getVarIntLength(dustSize);
|
||||||
// add value size
|
// add value size
|
||||||
dustSize += 8;
|
dustSize += 8;
|
||||||
if (['v0_p2wpkh', 'v0_p2wsh', 'v1_p2tr'].includes(vout.scriptpubkey_type)) {
|
if (isWitnessProgram(vout.scriptpubkey)) {
|
||||||
dustSize += 67;
|
dustSize += 67;
|
||||||
} else {
|
} else {
|
||||||
dustSize += 148;
|
dustSize += 148;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user