internal/ethapi: listen to ctx cancellation in access list (#29686)

pull/29692/head
Martin HS 7 months ago committed by GitHub
parent bd6bc37eec
commit 5e07054589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      internal/ethapi/api.go

@ -1524,6 +1524,9 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
prevTracer = logger.NewAccessListTracer(*args.AccessList, args.from(), to, precompiles) prevTracer = logger.NewAccessListTracer(*args.AccessList, args.from(), to, precompiles)
} }
for { for {
if err := ctx.Err(); err != nil {
return nil, 0, nil, err
}
// Retrieve the current access list to expand // Retrieve the current access list to expand
accessList := prevTracer.AccessList() accessList := prevTracer.AccessList()
log.Trace("Creating access list", "input", accessList) log.Trace("Creating access list", "input", accessList)

Loading…
Cancel
Save