mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
fix impossible condition: nil != nil
This commit is contained in:
parent
6ed8d399c2
commit
2306ceafb2
3 changed files with 2 additions and 12 deletions
|
|
@ -280,7 +280,7 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int
|
|||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
sub, err := event.NewSubscription(func(quit <-chan struct{}) error {
|
||||
sub := event.NewSubscription(func(quit <-chan struct{}) error {
|
||||
for _, log := range buff {
|
||||
select {
|
||||
case logs <- log:
|
||||
|
|
@ -289,11 +289,8 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int
|
|||
}
|
||||
}
|
||||
return nil
|
||||
}), nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return logs, sub, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ func getNonce(t *testing.T, userAddress common.Address) (uint64, error) {
|
|||
return 0, err
|
||||
}
|
||||
var result interface{}
|
||||
if err != nil {
|
||||
|
||||
return 0, err
|
||||
}
|
||||
err = rpcClient.Call(&result, "XDCx_getOrderCount", userAddress)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
|
|||
|
|
@ -501,9 +501,6 @@ func (whisper *Whisper) AddSymKeyFromPassword(password string) (string, error) {
|
|||
// kdf should run no less than 0.1 seconds on an average computer,
|
||||
// because it's an once in a session experience
|
||||
derived := pbkdf2.Key([]byte(password), nil, 65356, aesKeyLength, sha256.New)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
whisper.keyMu.Lock()
|
||||
defer whisper.keyMu.Unlock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue