From 09f24f35eff61861c21b854a648c3afec579ff47 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/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dex/handler.go') diff --git a/dex/handler.go b/dex/handler.go index a74c78e3b..a1a158560 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -724,7 +724,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } p.MarkTransaction(tx.Hash()) } - types.Transactions(txs).TouchSenders(types.MakeSigner(pm.blockchain.Config(), new(big.Int))) + types.GlobalSigCache.Add(types.NewEIP155Signer(pm.blockchain.Config().ChainID), txs) pm.txpool.AddRemotes(txs) case msg.Code == MetaMsg: -- cgit v1.2.3