fix linter across the whole project
This commit is contained in:
parent
8275391c09
commit
8cbd7ed1c4
|
@ -27,7 +27,7 @@ func faucetCommandHandler(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
fmt.Println("Starting Status Faucet node..")
|
||||
if err := statusAPI.StartNode(config); err != nil {
|
||||
if err = statusAPI.StartNode(config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func lesCommandHandler(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
fmt.Println("Starting Light Status node..")
|
||||
if err := statusAPI.StartNode(config); err != nil {
|
||||
if err = statusAPI.StartNode(config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ func wnode(ctx *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := statusAPI.StartNode(config); err != nil {
|
||||
if err = statusAPI.StartNode(config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ func makeWhisperNodeConfig(ctx *cli.Context) (*params.NodeConfig, error) {
|
|||
if whisperConfig.PasswordFile, err = filepath.Abs(whisperConfig.PasswordFile); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if _, err := whisperConfig.ReadPasswordFile(); err != nil {
|
||||
if _, err = whisperConfig.ReadPasswordFile(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ func makeWhisperNodeConfig(ctx *cli.Context) (*params.NodeConfig, error) {
|
|||
if whisperConfig.IdentityFile, err = filepath.Abs(whisperConfig.IdentityFile); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if _, err := whisperConfig.ReadIdentityFile(); err != nil {
|
||||
if _, err = whisperConfig.ReadIdentityFile(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,11 +124,7 @@ func (s *JailRPCTestSuite) TestContractDeployment() {
|
|||
|
||||
var txHash gethcommon.Hash
|
||||
signal.SetDefaultNodeNotificationHandler(func(jsonEvent string) {
|
||||
var (
|
||||
envelope signal.Envelope
|
||||
err error
|
||||
)
|
||||
|
||||
var envelope signal.Envelope
|
||||
err = json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
s.NoError(err, "cannot unmarshal JSON: %s", jsonEvent)
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ func (s *JailTestSuite) TestEventSignal() {
|
|||
// replace transaction notification handler
|
||||
signal.SetDefaultNodeNotificationHandler(func(jsonEvent string) {
|
||||
var envelope signal.Envelope
|
||||
err := json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
err = json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
s.NoError(err)
|
||||
|
||||
if envelope.Type == jail.EventSignal {
|
||||
|
|
|
@ -153,7 +153,7 @@ func (s *TransactionsTestSuite) TestSendContractTx() {
|
|||
var txHash gethcommon.Hash
|
||||
signal.SetDefaultNodeNotificationHandler(func(jsonEvent string) { // nolint :dupl
|
||||
var envelope signal.Envelope
|
||||
err := json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
err = json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
s.NoError(err, fmt.Sprintf("cannot unmarshal JSON: %s", jsonEvent))
|
||||
|
||||
if envelope.Type == txqueue.EventTransactionQueued {
|
||||
|
@ -244,7 +244,7 @@ func (s *TransactionsTestSuite) TestSendEther() {
|
|||
var txHash = gethcommon.Hash{}
|
||||
signal.SetDefaultNodeNotificationHandler(func(jsonEvent string) { // nolint: dupl
|
||||
var envelope signal.Envelope
|
||||
err := json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
err = json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
s.NoError(err, fmt.Sprintf("cannot unmarshal JSON: %s", jsonEvent))
|
||||
|
||||
if envelope.Type == txqueue.EventTransactionQueued {
|
||||
|
@ -327,7 +327,7 @@ func (s *TransactionsTestSuite) TestSendEtherTxUpstream() {
|
|||
var txHash = gethcommon.Hash{}
|
||||
signal.SetDefaultNodeNotificationHandler(func(jsonEvent string) { // nolint: dupl
|
||||
var envelope signal.Envelope
|
||||
err := json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
err = json.Unmarshal([]byte(jsonEvent), &envelope)
|
||||
s.NoError(err, "cannot unmarshal JSON: %s", jsonEvent)
|
||||
|
||||
if envelope.Type == txqueue.EventTransactionQueued {
|
||||
|
|
|
@ -80,7 +80,7 @@ func (m *NodeManager) startNode(config *params.NodeConfig) (<-chan struct{}, err
|
|||
defer HaltOnPanic()
|
||||
|
||||
// start underlying node
|
||||
if err := ethNode.Start(); err != nil {
|
||||
if startErr := ethNode.Start(); startErr != nil {
|
||||
close(m.nodeStarted)
|
||||
m.Lock()
|
||||
m.nodeStarted = nil
|
||||
|
@ -88,7 +88,7 @@ func (m *NodeManager) startNode(config *params.NodeConfig) (<-chan struct{}, err
|
|||
signal.Send(signal.Envelope{
|
||||
Type: signal.EventNodeCrashed,
|
||||
Event: signal.NodeCrashEvent{
|
||||
Error: fmt.Errorf("%v: %v", ErrNodeStartFailure, err).Error(),
|
||||
Error: fmt.Errorf("%v: %v", ErrNodeStartFailure, startErr).Error(),
|
||||
},
|
||||
})
|
||||
return
|
||||
|
|
|
@ -239,9 +239,9 @@ func (m *Manager) completeRemoteTransaction(queuedTx *common.QueuedTx, password
|
|||
args := queuedTx.Args
|
||||
|
||||
if args.GasPrice == nil {
|
||||
value, err := m.gasPrice()
|
||||
if err != nil {
|
||||
return emptyHash, err
|
||||
value, gasPriceErr := m.gasPrice()
|
||||
if gasPriceErr != nil {
|
||||
return emptyHash, gasPriceErr
|
||||
}
|
||||
|
||||
args.GasPrice = value
|
||||
|
|
Loading…
Reference in New Issue