node: remove unused error return from Attach (#27450)

node: Delete the unused error from return parameters of Node.Attach() func
This commit is contained in:
Sanghee Choi
2023-06-14 08:24:47 -04:00
committed by GitHub
parent 6f08c2f3f1
commit acc2a2ac61
8 changed files with 10 additions and 29 deletions
+2 -5
View File
@@ -147,7 +147,7 @@ func (s *SimAdapter) DialRPC(id enode.ID) (*rpc.Client, error) {
if !ok {
return nil, fmt.Errorf("unknown node: %s", id)
}
return node.node.Attach()
return node.node.Attach(), nil
}
// GetNode returns the node with the given ID if it exists
@@ -274,10 +274,7 @@ func (sn *SimNode) Start(snapshots map[string][]byte) error {
}
// create an in-process RPC client
client, err := sn.node.Attach()
if err != nil {
return err
}
client := sn.node.Attach()
sn.lock.Lock()
sn.client = client
sn.lock.Unlock()