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@byzantine-lab.io>2019-06-12 17:27:18 +0800
commit95cdd25856f2a38861f6abd622cbc3232f909268 (patch)
tree1c76919498802cd58ab1601f1b9c9e4c1cf856f2 /dex/handler.go
parent43846e6cfaa477d406277895275bf3c722e1bdec (diff)
downloadgo-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar.gz
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar.bz2
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar.lz
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar.xz
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.tar.zst
go-tangerine-95cdd25856f2a38861f6abd622cbc3232f909268.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: