Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Aug 13, 2024
1 parent 8ee62bd commit 5f6d5b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go/enclave/nodetype/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func ExportCrossChainData(ctx context.Context, storage storage.Storage, fromSeqN
return nil, errutil.ErrCrossChainBundleNoBatches
}

//todo - siliev - all those fetches need to be atomic
// todo - siliev - all those fetches need to be atomic
header, err := storage.FetchHeadBatchHeader(ctx)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions tools/walletextension/rpcapi/transaction_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.
}

func (s *TransactionAPI) SendTransaction(ctx context.Context, args gethapi.TransactionArgs) (common.Hash, error) {
txRec, err := ExecAuthRPC[common.Hash](ctx, s.we, &ExecCfg{account: args.From, deadline: sendTransactionDuration}, "eth_sendTransaction", args)
txRec, err := ExecAuthRPC[common.Hash](ctx, s.we, &ExecCfg{account: args.From, timeout: sendTransactionDuration}, "eth_sendTransaction", args)
if err != nil {
return common.Hash{}, err
}
Expand Down Expand Up @@ -131,7 +131,7 @@ func (s *TransactionAPI) FillTransaction(ctx context.Context, args gethapi.Trans
}

func (s *TransactionAPI) SendRawTransaction(ctx context.Context, input hexutil.Bytes) (common.Hash, error) {
txRec, err := ExecAuthRPC[common.Hash](ctx, s.we, &ExecCfg{tryAll: true, deadline: sendTransactionDuration}, "eth_sendRawTransaction", input)
txRec, err := ExecAuthRPC[common.Hash](ctx, s.we, &ExecCfg{tryAll: true, timeout: sendTransactionDuration}, "eth_sendRawTransaction", input)
if err != nil {
return common.Hash{}, err
}
Expand Down
4 changes: 2 additions & 2 deletions tools/walletextension/rpcapi/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type ExecCfg struct {
tryUntilAuthorised bool
adjustArgs func(acct *GWAccount) []any
cacheCfg *CacheCfg
deadline time.Duration
timeout time.Duration
}

type CacheStrategy uint8
Expand Down Expand Up @@ -139,7 +139,7 @@ func ExecAuthRPC[R any](ctx context.Context, w *Services, cfg *ExecCfg, method s
}

// wrap the context with a timeout to prevent long executions
deadline := cfg.deadline
deadline := cfg.timeout
// if not set, use default
if deadline == 0 {
deadline = maximumRPCCallDuration
Expand Down

0 comments on commit 5f6d5b8

Please sign in to comment.