From bc14798fa20d68140c1605ae916a3587ec1288ac Mon Sep 17 00:00:00 2001 From: erikzhang Date: Thu, 14 Mar 2019 21:39:14 +0800 Subject: [PATCH] Expose `RpcServer.MaxGasInvoke` --- neo/Network/RPC/RpcServer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neo/Network/RPC/RpcServer.cs b/neo/Network/RPC/RpcServer.cs index faf8778fdb..96d71f5c9c 100644 --- a/neo/Network/RPC/RpcServer.cs +++ b/neo/Network/RPC/RpcServer.cs @@ -31,16 +31,16 @@ namespace Neo.Network.RPC public sealed class RpcServer : IDisposable { public Wallet Wallet { get; set; } + public Fixed8 MaxGasInvoke { get; } private IWebHost host; - private Fixed8 maxGasInvoke; private readonly NeoSystem system; public RpcServer(NeoSystem system, Wallet wallet = null, Fixed8 maxGasInvoke = default(Fixed8)) { this.system = system; this.Wallet = wallet; - this.maxGasInvoke = maxGasInvoke; + this.MaxGasInvoke = maxGasInvoke; } private static JObject CreateErrorResponse(JObject id, int code, string message, JObject data = null) @@ -73,7 +73,7 @@ public void Dispose() private JObject GetInvokeResult(byte[] script) { - ApplicationEngine engine = ApplicationEngine.Run(script, extraGAS: maxGasInvoke); + ApplicationEngine engine = ApplicationEngine.Run(script, extraGAS: MaxGasInvoke); JObject json = new JObject(); json["script"] = script.ToHexString(); json["state"] = engine.State;