diff --git a/ledger/conway/errors.go b/ledger/conway/errors.go index 9895e8ee..27de380b 100644 --- a/ledger/conway/errors.go +++ b/ledger/conway/errors.go @@ -25,7 +25,7 @@ type NonDisjointRefInputsError struct { } func (e NonDisjointRefInputsError) Error() string { - tmpInputs := make([]string, 0, len(e.Inputs)) + tmpInputs := make([]string, len(e.Inputs)) for idx, tmpInput := range e.Inputs { tmpInputs[idx] = tmpInput.String() } diff --git a/ledger/mary/errors.go b/ledger/mary/errors.go index e25554a1..607a35de 100644 --- a/ledger/mary/errors.go +++ b/ledger/mary/errors.go @@ -26,7 +26,7 @@ type OutputTooBigUtxoError struct { } func (e OutputTooBigUtxoError) Error() string { - tmpOutputs := make([]string, 0, len(e.Outputs)) + tmpOutputs := make([]string, len(e.Outputs)) for idx, tmpOutput := range e.Outputs { tmpOutputs[idx] = fmt.Sprintf("%#v", tmpOutput) } diff --git a/ledger/shelley/errors.go b/ledger/shelley/errors.go index 0e69c6f7..52a0a1bf 100644 --- a/ledger/shelley/errors.go +++ b/ledger/shelley/errors.go @@ -58,7 +58,7 @@ type BadInputsUtxoError struct { } func (e BadInputsUtxoError) Error() string { - tmpInputs := make([]string, 0, len(e.Inputs)) + tmpInputs := make([]string, len(e.Inputs)) for idx, tmpInput := range e.Inputs { tmpInputs[idx] = tmpInput.String() } @@ -71,7 +71,7 @@ type WrongNetworkError struct { } func (e WrongNetworkError) Error() string { - tmpAddrs := make([]string, 0, len(e.Addrs)) + tmpAddrs := make([]string, len(e.Addrs)) for idx, tmpAddr := range e.Addrs { tmpAddrs[idx] = tmpAddr.String() } @@ -84,7 +84,7 @@ type WrongNetworkWithdrawalError struct { } func (e WrongNetworkWithdrawalError) Error() string { - tmpAddrs := make([]string, 0, len(e.Addrs)) + tmpAddrs := make([]string, len(e.Addrs)) for idx, tmpAddr := range e.Addrs { tmpAddrs[idx] = tmpAddr.String() } @@ -109,7 +109,7 @@ type OutputTooSmallUtxoError struct { } func (e OutputTooSmallUtxoError) Error() string { - tmpOutputs := make([]string, 0, len(e.Outputs)) + tmpOutputs := make([]string, len(e.Outputs)) for idx, tmpOutput := range e.Outputs { tmpOutputs[idx] = fmt.Sprintf("%#v", tmpOutput) } @@ -121,7 +121,7 @@ type OutputBootAddrAttrsTooBigError struct { } func (e OutputBootAddrAttrsTooBigError) Error() string { - tmpOutputs := make([]string, 0, len(e.Outputs)) + tmpOutputs := make([]string, len(e.Outputs)) for idx, tmpOutput := range e.Outputs { tmpOutputs[idx] = fmt.Sprintf("%#v", tmpOutput) }