From d87ff0674517f6ddf061940d8e2e33c452f9f4af Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "eth: abort on api operations not available in pbss-mode (#28104)" This reverts commit 8ac50731c87790d845ac52b5699765252d311690. --- eth/api_debug.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/eth/api_debug.go b/eth/api_debug.go index dc9f56814699..22dd6b0cf765 100644 --- a/eth/api_debug.go +++ b/eth/api_debug.go @@ -362,9 +362,6 @@ func (api *DebugAPI) getModifiedAccounts(startBlock, endBlock *types.Block) ([]c // The (from, to) parameters are the sequence of blocks to search, which can go // either forwards or backwards func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error) { - if api.eth.blockchain.TrieDB().Scheme() == rawdb.PathScheme { - return 0, errors.New("state history is not yet available in path-based scheme") - } db := api.eth.ChainDb() var pivot uint64 if p := rawdb.ReadLastPivotNumber(db); p != nil { @@ -425,9 +422,6 @@ func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error // 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 { - if api.eth.blockchain.TrieDB().Scheme() == rawdb.PathScheme { - return errors.New("trie flush interval is undefined for path-based scheme") - } t, err := time.ParseDuration(interval) if err != nil { return err @@ -437,9 +431,6 @@ func (api *DebugAPI) SetTrieFlushInterval(interval string) error { } // GetTrieFlushInterval gets the current value of in-memory trie flush interval -func (api *DebugAPI) GetTrieFlushInterval() (string, error) { - if api.eth.blockchain.TrieDB().Scheme() == rawdb.PathScheme { - return "", errors.New("trie flush interval is undefined for path-based scheme") - } - return api.eth.blockchain.GetTrieFlushInterval().String(), nil +func (api *DebugAPI) GetTrieFlushInterval() string { + return api.eth.blockchain.GetTrieFlushInterval().String() }