forked from cerc-io/plugeth
eth,core: add api debug_getTrieFlushInterval (#27303)
* core,eth: add api debug_getTrieFlushInterval Signed-off-by: jsvisa <delweng@gmail.com> * eth/api_debug: comment of SetTrieFlushInterval Signed-off-by: jsvisa <delweng@gmail.com> * Apply suggestions from code review --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
co-authored by
Martin Holst Swende
parent
950d5643b1
commit
0783cb7d91
@@ -2492,3 +2492,8 @@ 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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user