aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain.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 21:32:53 +0800
commit09f24f35eff61861c21b854a648c3afec579ff47 (patch)
tree58f6f2d102924a56d0030496427958eba292ba41 /core/blockchain.go
parent9ff5a4e83badfa43c78636f06917c1a8f0a25d9f (diff)
downloaddexon-09f24f35eff61861c21b854a648c3afec579ff47.tar.gz
dexon-09f24f35eff61861c21b854a648c3afec579ff47.tar.zst
dexon-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 'core/blockchain.go')
-rw-r--r--core/blockchain.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 983448de8..e7b1c846f 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -268,7 +268,7 @@ func (bc *BlockChain) AddConfirmedBlock(block *coreTypes.Block) error {
if err != nil {
return err
}
- _, err = transactions.TouchSenders(types.MakeSigner(bc.Config(), new(big.Int)))
+ _, err = types.GlobalSigCache.Add(types.NewEIP155Signer(bc.Config().ChainID), transactions)
if err != nil {
return err
}