aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.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>2018-12-19 20:54:27 +0800
commit95f84f10c8575e3d8ea6a73e2b548a58a9ffb7c4 (patch)
tree77ea593954ca9d0571967a10357f63b9dac792cb /dex/app.go
parent2cf60ac04074e08bf5f33d72c763e988ea4db82c (diff)
downloaddexon-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 'dex/app.go')
-rw-r--r--dex/app.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dex/app.go b/dex/app.go
index 99514ed83..df76b2b7d 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -327,7 +327,7 @@ func (d *DexconApp) VerifyBlock(block *coreTypes.Block) coreTypes.BlockVerifySta
return coreTypes.VerifyInvalidBlock
}
- _, err = transactions.TouchSenders(types.MakeSigner(d.blockchain.Config(), new(big.Int)))
+ _, err = types.GlobalSigCache.Add(types.NewEIP155Signer(d.blockchain.Config().ChainID), transactions)
if err != nil {
log.Error("Failed to calculate sender", "error", err)
return coreTypes.VerifyInvalidBlock