Skip to content

Commit

Permalink
Revert "eth,core: add api debug_getTrieFlushInterval (ethereum#27303)"
Browse files Browse the repository at this point in the history
This reverts commit 6d231bb.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 9749e5b commit 824c8cc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions core/blockchain.go
Expand Up @@ -2492,8 +2492,3 @@ func (bc *BlockChain) SetBlockValidatorAndProcessorForTesting(v Validator, p Pro
func (bc *BlockChain) SetTrieFlushInterval(interval time.Duration) {
bc.flushInterval.Store(int64(interval))
}

// GetTrieFlushInterval gets the in-memroy tries flush interval
func (bc *BlockChain) GetTrieFlushInterval() time.Duration {
return time.Duration(bc.flushInterval.Load())
}
7 changes: 0 additions & 7 deletions eth/api_debug.go
Expand Up @@ -406,8 +406,6 @@ func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error

// SetTrieFlushInterval configures how often in-memory tries are persisted
// to disk. The value is in terms of block processing time, not wall clock.
// If the value is shorter than the block generation time, or even 0 or negative,
// the node will flush trie after processing each block (effectively archive mode).
func (api *DebugAPI) SetTrieFlushInterval(interval string) error {
t, err := time.ParseDuration(interval)
if err != nil {
Expand All @@ -416,8 +414,3 @@ func (api *DebugAPI) SetTrieFlushInterval(interval string) error {
api.eth.blockchain.SetTrieFlushInterval(t)
return nil
}

// GetTrieFlushInterval gets the current value of in-memory trie flush interval
func (api *DebugAPI) GetTrieFlushInterval() string {
return api.eth.blockchain.GetTrieFlushInterval().String()
}
5 changes: 0 additions & 5 deletions internal/web3ext/web3ext.go
Expand Up @@ -495,11 +495,6 @@ web3._extend({
call: 'debug_setTrieFlushInterval',
params: 1
}),
new web3._extend.Method({
name: 'getTrieFlushInterval',
call: 'debug_getTrieFlushInterval',
params: 0
}),
],
properties: []
});
Expand Down

0 comments on commit 824c8cc

Please sign in to comment.