mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
ethclient: implement Dial in terms of DialContext
This commit is contained in:
parent
cbabb84560
commit
ea4ced5bb0
1 changed files with 1 additions and 5 deletions
|
|
@ -39,11 +39,7 @@ type Client struct {
|
||||||
|
|
||||||
// Dial connects a client to the given URL.
|
// Dial connects a client to the given URL.
|
||||||
func Dial(rawurl string) (*Client, error) {
|
func Dial(rawurl string) (*Client, error) {
|
||||||
c, err := rpc.Dial(rawurl)
|
return DialContext(context.Background(), rawurl)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return NewClient(c), nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func DialContext(ctx context.Context, rawurl string) (*Client, error) {
|
func DialContext(ctx context.Context, rawurl string) (*Client, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue