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/tx_pool.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/tx_pool.go')
-rw-r--r-- | core/tx_pool.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go index cfec195c8..703d75e75 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -946,7 +946,7 @@ func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) { } } - types.DeleteTxCacheByHash(hash) + types.GlobalSigCache.Prune([]common.Hash{hash}) } // promoteExecutables moves transactions that have become processable from the |