go-ipfs-config: fix: correct the default-datastore config profile
And use an actual profile instead of just aliasing.
Steven Allen committed
Apr 27, 2020 at 14:34 UTC
515d6905e38e4593a730c54725d43873ee2b2200
1 file changed
+14
-4
config/profile.go
+14
-4
@@ -110,6 +110,20 @@ Inverse profile of the test profile.`,
110
return nil
111
},
112
},
113
+ "default-datastore": {
114
+ Description: `Configures the node to use the default datastore (flatfs).
115
+
116
+Read the "flatfs" profile description for more information on this datastore.
117
+
118
+This profile may only be applied when first initializing the node.
119
+`,
120
+
121
+ InitOnly: true,
122
+ Transform: func(c *Config) error {
123
+ c.Datastore.Spec = flatfsSpec()
124
+ return nil
125
+ },
126
+ },
127
"flatfs": {
128
Description: `Configures the node to use the flatfs datastore.
129
@@ -189,10 +203,6 @@ fetching may be degraded.
203
},
204
}
205
192
-func init() {
193
- Profiles["default-datatore"] = Profiles["badgerds"]
194
-}
195
-
206
func getAvailablePort() (port int, err error) {
207
ln, err := net.Listen("tcp", "[::]:0")
208
if err != nil {