From 95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Wed, 21 Nov 2018 16:14:51 +0800 Subject: core: add global signature cache and improve concurrency (#42) From the go trace result, the bottleneck hides in the lock of StoreTxCache. To improve this, we update the cache in a batched fassion. --- dex/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dex/app.go') diff --git a/dex/app.go b/dex/app.go index 99514ed83..df76b2b7d 100644 --- a/dex/app.go +++ b/dex/app.go @@ -327,7 +327,7 @@ func (d *DexconApp) VerifyBlock(block *coreTypes.Block) coreTypes.BlockVerifySta return coreTypes.VerifyInvalidBlock } - _, err = transactions.TouchSenders(types.MakeSigner(d.blockchain.Config(), new(big.Int))) + _, err = types.GlobalSigCache.Add(types.NewEIP155Signer(d.blockchain.Config().ChainID), transactions) if err != nil { log.Error("Failed to calculate sender", "error", err) return coreTypes.VerifyInvalidBlock -- cgit v1.2.3