aboutsummaryrefslogtreecommitdiffstats
path: root/graphql
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-04-08 19:49:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-08 19:49:52 +0800
commite2f3465e83a4c03b48977ed367e68b0d63ca2ed1 (patch)
treeb8cb683600672789aa7b56ed349fbceaaa2ae4ae /graphql
parented97517ff4db1982251d8bf7dbeca565159e3604 (diff)
downloadgo-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar.gz
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar.bz2
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar.lz
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar.xz
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.tar.zst
go-tangerine-e2f3465e83a4c03b48977ed367e68b0d63ca2ed1.zip
eth, les, geth: implement cli-configurable global gas cap for RPC calls (#19401)
* eth, les, geth: implement cli-configurable global gas cap for RPC calls * graphql, ethapi: place gas cap in DoCall * ethapi: reformat log message
Diffstat (limited to 'graphql')
-rw-r--r--graphql/graphql.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphql/graphql.go b/graphql/graphql.go
index b3bcbd8a4..d22a3afb6 100644
--- a/graphql/graphql.go
+++ b/graphql/graphql.go
@@ -856,7 +856,7 @@ func (b *Block) Call(ctx context.Context, args struct {
}
}
- result, gas, failed, err := ethapi.DoCall(ctx, b.backend, args.Data, *b.num, vm.Config{}, 5*time.Second)
+ result, gas, failed, err := ethapi.DoCall(ctx, b.backend, args.Data, *b.num, vm.Config{}, 5*time.Second, b.backend.RPCGasCap())
status := hexutil.Uint64(1)
if failed {
status = 0
@@ -883,7 +883,7 @@ func (b *Block) EstimateGas(ctx context.Context, args struct {
}
}
- gas, err := ethapi.DoEstimateGas(ctx, b.backend, args.Data, *b.num)
+ gas, err := ethapi.DoEstimateGas(ctx, b.backend, args.Data, *b.num, b.backend.RPCGasCap())
return gas, err
}
@@ -927,7 +927,7 @@ func (p *Pending) Account(ctx context.Context, args struct {
func (p *Pending) Call(ctx context.Context, args struct {
Data ethapi.CallArgs
}) (*CallResult, error) {
- result, gas, failed, err := ethapi.DoCall(ctx, p.backend, args.Data, rpc.PendingBlockNumber, vm.Config{}, 5*time.Second)
+ result, gas, failed, err := ethapi.DoCall(ctx, p.backend, args.Data, rpc.PendingBlockNumber, vm.Config{}, 5*time.Second, p.backend.RPCGasCap())
status := hexutil.Uint64(1)
if failed {
status = 0
@@ -942,7 +942,7 @@ func (p *Pending) Call(ctx context.Context, args struct {
func (p *Pending) EstimateGas(ctx context.Context, args struct {
Data ethapi.CallArgs
}) (hexutil.Uint64, error) {
- return ethapi.DoEstimateGas(ctx, p.backend, args.Data, rpc.PendingBlockNumber)
+ return ethapi.DoEstimateGas(ctx, p.backend, args.Data, rpc.PendingBlockNumber, p.backend.RPCGasCap())
}
// Resolver is the top-level object in the GraphQL hierarchy.