diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-21 16:14:51 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4 (patch) | |
tree | 77ea593954ca9d0571967a10357f63b9dac792cb /core/blockchain.go | |
parent | 2cf60ac04074e08bf5f33d72c763e988ea4db82c (diff) | |
download | dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar.gz dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar.bz2 dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar.lz dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar.xz dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.tar.zst dexon-95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4.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.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index eec1a6879..ea1c9a210 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 } |