From 4dca6c6ebe2f52acdf0643959d0cab8541d21697 Mon Sep 17 00:00:00 2001 From: Sylar Date: Sat, 22 Apr 2023 22:55:32 +0800 Subject: [PATCH] SimulateTx (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sim Tx RPC * Log * Sim * 1 * 1 * SimTx * Toml MainArb修复 Sim添加错误缓存 && TxCal Simulate打印 解决服务器太多上传Tx不能打印问题 新增热更新SimulateTx列表 && SimTx 上报 SimulateTx (#14) * Sim Tx RPC * Log * Sim * 1 * 1 * SimTx * Toml MainArb修复 Sim添加错误缓存 && TxCal Simulate打印 解决服务器太多上传Tx不能打印问题 新增热更新SimulateTx列表 && SimTx 上报 db Service tx DB添加字段 Simulate Tx --- cmd/arb | 2 +- cmd/geth/main.go | 4 +++- core/blockchain.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/arb b/cmd/arb index e4d15b3ef8..ce31795fb8 160000 --- a/cmd/arb +++ b/cmd/arb @@ -1 +1 @@ -Subproject commit e4d15b3ef8c7c7a6aef1d34a8bce8f671d054a42 +Subproject commit ce31795fb82e1493056961c60aa831887f34bd3c diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 89b838a1a1..8d2c876025 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -322,7 +322,9 @@ func geth(ctx *cli.Context) error { Simulate.GetSimulatorManagerInstance().ConfigEthereumEnv(backend, ethereumServer) startNode(ctx, stack, backend, false) //sylarChange - go RPCServer.GetArbRPCServerManagerInstance().StartRPCServer() + RPCS := RPCServer.GetArbRPCServerManagerInstance() + go RPCS.StartRPCServer() + log.Info("Start RPC Server Success 🍻🍻🍻") stack.Wait() return nil } diff --git a/core/blockchain.go b/core/blockchain.go index 2e67c2f3c1..2465fb67e9 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -20,6 +20,7 @@ package core import ( "errors" "fmt" + "github.com/ethereum/go-ethereum/cmd/arb/Block" "io" "math/big" "sort" @@ -1988,7 +1989,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool) "root", block.Root()) lastCanon = block - + Block.GetBlockManagerInstance().ConfigBlockNumber(block.NumberU64()) //sylarchange 保存当前DB中最新的BlockNum // Only count canonical blocks for GC processing time bc.gcproc += proctime