aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-21 16:14:51 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:49:57 +0800
commitb68c73efe8be135b65a012f09de3dafe4a45c195 (patch)
treeb1f4073a2cb7a51236984697fec319bc48cfa8b3 /dex/handler.go
parent135e80bc8c1292785392aedffb98dd769f38edb1 (diff)
downloaddexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar.gz
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar.bz2
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar.lz
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar.xz
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.tar.zst
dexon-b68c73efe8be135b65a012f09de3dafe4a45c195.zip
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.
Diffstat (limited to 'dex/handler.go')
-rw-r--r--dex/handler.go2
1 files changed, 1 insertions, 1 deletions
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: