mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
TransactionOutput: fix regression with calculating getMinNonDustValue() for the multisig case
This commit is contained in:
parent
8c3cf0acd5
commit
c68cd2e616
@ -234,7 +234,7 @@ public class TransactionOutput {
|
|||||||
// 294 satoshis at the default rate of 3000 sat/kB.
|
// 294 satoshis at the default rate of 3000 sat/kB.
|
||||||
long size = this.serialize().length;
|
long size = this.serialize().length;
|
||||||
final Script script = getScriptPubKey();
|
final Script script = getScriptPubKey();
|
||||||
if (ScriptPattern.isP2PKH(script) || ScriptPattern.isP2PK(script) || ScriptPattern.isP2SH(script))
|
if (ScriptPattern.isP2PKH(script) || ScriptPattern.isP2PK(script) || ScriptPattern.isP2SH(script) || ScriptPattern.isSentToMultisig(script))
|
||||||
size += 32 + 4 + 1 + 107 + 4; // 148
|
size += 32 + 4 + 1 + 107 + 4; // 148
|
||||||
else if (ScriptPattern.isP2WH(script))
|
else if (ScriptPattern.isP2WH(script))
|
||||||
size += 32 + 4 + 1 + (107 / 4) + 4; // 68
|
size += 32 + 4 + 1 + (107 / 4) + 4; // 68
|
||||||
|
Loading…
Reference in New Issue
Block a user