aboutsummaryrefslogtreecommitdiff
path: root/eth
diff options
context:
space:
mode:
Diffstat (limited to 'eth')
-rw-r--r--eth/config.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/eth/config.go b/eth/config.go
index 85abe7c..ee0fdb7 100644
--- a/eth/config.go
+++ b/eth/config.go
@@ -17,6 +17,7 @@
package eth
import (
+ "errors"
"math/big"
"os"
"os/user"
@@ -160,8 +161,20 @@ type Config struct {
// Istanbul block override (TODO: remove after the fork)
OverrideIstanbul *big.Int
- // Manually select and grow the canonical chain
- ManualCanonical bool
+ // Manually select and grow the canonical chain
+ ManualCanonical bool
+}
+
+func (cfg *Config) SetGCMode(gcmode string) error {
+ switch gcmode {
+ case "full":
+ cfg.NoPruning = false
+ case "archive":
+ cfg.NoPruning = true
+ default:
+ return errors.New("invalid gcmode value")
+ }
+ return nil
}
func MyDefaultConfig() Config {