mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Wrap errors (#3123)
This commit is contained in:
committed by
terence tsao
parent
7eca7ba43b
commit
953c59a302
@@ -31,6 +31,7 @@ go_library(
|
||||
"@com_github_ethereum_go_ethereum//ethclient:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//rpc:go_default_library",
|
||||
"@com_github_gogo_protobuf//proto:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
@@ -92,6 +93,7 @@ go_image(
|
||||
"@com_github_ethereum_go_ethereum//ethclient:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//rpc:go_default_library",
|
||||
"@com_github_gogo_protobuf//proto:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
|
||||
"@com_github_prysmaticlabs_go_ssz//:go_default_library",
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"crypto/ecdsa"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"sync"
|
||||
|
||||
@@ -13,6 +12,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/pkg/errors"
|
||||
contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/cluster"
|
||||
"github.com/prysmaticlabs/prysm/shared/keystore"
|
||||
@@ -70,7 +70,7 @@ func (s *server) makeDeposit(pubkey []byte, withdrawalCredentials []byte, signat
|
||||
txOps.GasLimit = gasLimit
|
||||
tx, err := s.contract.Deposit(txOps, pubkey, withdrawalCredentials, signature)
|
||||
if err != nil {
|
||||
return fmt.Errorf("deposit failed: %v", err)
|
||||
return errors.Wrap(err, "deposit failed")
|
||||
}
|
||||
log.WithField("tx", tx.Hash().Hex()).Info("Deposit transaction sent")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user