[#521] *: use stdlib errors package

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-18 11:12:51 +03:00 committed by Alex Vanin
parent 43e575cec2
commit 71b87155ef
171 changed files with 825 additions and 674 deletions

View file

@ -1,10 +1,11 @@
package container
import (
"fmt"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
"github.com/pkg/errors"
)
// StartEstimation structure of container.StartEstimation notification from
@ -59,7 +60,7 @@ func parseEstimation(params []stackitem.Item) (uint64, error) {
// parse container
epoch, err := client.IntFromStackItem(params[0])
if err != nil {
return 0, errors.Wrap(err, "could not get estimation epoch")
return 0, fmt.Errorf("could not get estimation epoch: %w", err)
}
return uint64(epoch), nil