diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-21 16:14:51 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:53 +0800 |
commit | 09f24f35eff61861c21b854a648c3afec579ff47 (patch) | |
tree | 58f6f2d102924a56d0030496427958eba292ba41 /dex/handler.go | |
parent | 9ff5a4e83badfa43c78636f06917c1a8f0a25d9f (diff) | |
download | go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar.gz go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar.bz2 go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar.lz go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar.xz go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.tar.zst go-tangerine-09f24f35eff61861c21b854a648c3afec579ff47.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.go | 2 |
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: |