mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Fix the base for networkID with hex format.
This commit is contained in:
parent
142c94d628
commit
0c5dac4ff7
1 changed files with 1 additions and 1 deletions
|
|
@ -359,7 +359,7 @@ func (ec *Client) NetworkID(ctx context.Context) (*big.Int, error) {
|
||||||
if err := ec.c.CallContext(ctx, &ver, "net_version"); err != nil {
|
if err := ec.c.CallContext(ctx, &ver, "net_version"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if _, ok := version.SetString(ver, 10); !ok {
|
if _, ok := version.SetString(ver, 0); !ok {
|
||||||
return nil, fmt.Errorf("invalid net_version result %q", ver)
|
return nil, fmt.Errorf("invalid net_version result %q", ver)
|
||||||
}
|
}
|
||||||
return version, nil
|
return version, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue