We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16b422a commit 92a6033Copy full SHA for 92a6033
wallet/txrules/rules.go
@@ -39,14 +39,14 @@ var (
39
40
// CheckOutput performs simple consensus and policy tests on a transaction
41
// output.
42
-func CheckOutput(output *wire.TxOut, relayFeePerKb btcutil.Amount) error {
+func CheckOutput(output *wire.TxOut, relayFeePerKb btcutil.Amount, allowDust bool) error {
43
if output.Value < 0 {
44
return ErrAmountNegative
45
}
46
if output.Value > btcutil.MaxSatoshi {
47
return ErrAmountExceedsMax
48
49
- if IsDustOutput(output, relayFeePerKb) {
+ if !allowDust && IsDustOutput(output, relayFeePerKb) {
50
return ErrOutputIsDust
51
52
return nil
0 commit comments