Skip to content

Commit

Permalink
lint: Obey
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Dec 5, 2023
1 parent 5d9cf84 commit 4cae1ac
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,20 @@ type Client interface {
// args must be encoded in the format RPC understands
Call(result interface{}, method string, args ...interface{}) error

CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error

Subscribe(ctx context.Context, namespace, subscribeMethodSuffix, unsubscribeMethodSuffix,
notificationMethodSuffix string, channel interface{}, args ...interface{}) (
*gethrpc.ClientSubscription, error)
CallContext(
ctx context.Context,
result interface{},
method string,
args ...interface{},
) error

Subscribe(
ctx context.Context,
namespace, subscribeMethodSuffix, unsubscribeMethodSuffix,
notificationMethodSuffix string,
channel interface{},
args ...interface{},
) (*gethrpc.ClientSubscription, error)

URL() string

Expand Down Expand Up @@ -80,7 +89,14 @@ func CallWithBlockHash(c Client, target interface{}, method string, blockHash *t
return CallWithBlockHashContext(ctx, c, target, method, blockHash, args...)
}

func CallWithBlockHashContext(ctx context.Context, c Client, target interface{}, method string, blockHash *types.Hash, args ...interface{}) error {
func CallWithBlockHashContext(
ctx context.Context,
c Client,
target interface{},
method string,
blockHash *types.Hash,
args ...interface{},
) error {
if blockHash == nil {
err := c.CallContext(ctx, target, method, args...)
if err != nil {
Expand Down

0 comments on commit 4cae1ac

Please sign in to comment.