diff --git a/core/headerchain.go b/core/headerchain.go index cb52014b08..81c77ccf36 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -70,7 +70,6 @@ type HeaderChain struct { tdCache *lru.Cache[common.Hash, *big.Int] // most recent total difficulties numberCache *lru.Cache[common.Hash, uint64] // most recent block numbers // SYSCOIN - NEVMCache *lru.Cache[common.Hash, []byte] // Cache for NEVM blocks existing SYSHashCache *lru.Cache[uint64, []byte] // Cache for SYS hash DataHashCache *lru.Cache[common.Hash, []byte] // Cache for Data availability NEVMAddressCache *rawdb.NEVMAddressMapping @@ -90,7 +89,6 @@ func NewHeaderChain(chainDb ethdb.Database, config *params.ChainConfig, engine c // SYSCOIN SYSHashCache: lru.NewCache[uint64, []byte](SYSBlockCacheLimit), DataHashCache: lru.NewCache[common.Hash, []byte](SYSBlockCacheLimit), - NEVMCache: lru.NewCache[common.Hash, []byte](headerCacheLimit), procInterrupt: procInterrupt, engine: engine, } @@ -718,7 +716,6 @@ func (hc *HeaderChain) setHead(headBlock uint64, headTime uint64, updateFn Updat hc.numberCache.Purge() // SYSCOIN hc.SYSHashCache.Purge() - hc.NEVMCache.Purge() hc.DataHashCache.Purge() } diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 8ebb27a59e..d21a5d0a48 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -115,7 +115,6 @@ var ( skeletonHeaderPrefix = []byte("S") // skeletonHeaderPrefix + num (uint64 big endian) -> header // SYSCOIN - nevmToSysPrefix = []byte("x") // nevmToSysPrefix + nevm block hash -> nevmBlock blockNumToSysKeyPrefix = []byte("z") // blockNumToSysKeyPrefix + block number -> SYS block hash dataHashesKeyPrefix = []byte("y") // dataHashesKeyPrefix + block number -> versioned hashes dataHashKeyPrefix = []byte("w") // dataHashKeyPrefix + versioned hash -> versioned hash @@ -356,11 +355,6 @@ func IsStorageTrieNode(key []byte) bool { } // SYSCOIN -// nevmToSysKey = nevmToSysPrefix + hash -func nevmToSysKey(hash common.Hash) []byte { - return append(nevmToSysPrefix, hash.Bytes()...) -} - // blockNumToSysKey = blockNumToSysKeyPrefix + blocknumber func blockNumToSysKey(n uint64) []byte { return append(blockNumToSysKeyPrefix, []byte(new(big.Int).SetUint64(n).String())...)