Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/algod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package main

import (
"encoding/json"
"flag"
"fmt"
"math/rand"
Expand Down Expand Up @@ -174,6 +175,14 @@ func run() int {
log.Fatalf("Cannot load config: %v", err)
}

// log is not setup yet
fmt.Printf("Config loaded from %s\n", absolutePath)
fmt.Println("Configuration after loading/defaults merge: ")
Comment thread
gmalouf marked this conversation as resolved.
err = json.NewEncoder(os.Stdout).Encode(cfg)
if err != nil {
fmt.Println("Error encoding config: ", err)
}

// set soft memory limit, if configured
if cfg.GoMemLimit > 0 {
debug.SetMemoryLimit(int64(cfg.GoMemLimit))
Expand Down
27 changes: 27 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,33 @@
}
}
},
"/debug/settings/config": {
"get": {
"description": "Returns the merged (defaults + overrides) config file in json.",
"tags": [
"private"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"summary": "Gets the merged config file.",
"operationId": "GetConfig",
"responses": {
"200": {
"description": "The merged config file in json.",
"schema": {
"type": "string"
}
},
"default": {
"description": "Unknown Error"
}
}
}
},
"/v2/accounts/{address}": {
"get": {
"description": "Given a specific account public key, this call returns the accounts status, balance and spendable amounts",
Expand Down
26 changes: 26 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,32 @@
},
"openapi": "3.0.1",
"paths": {
"/debug/settings/config": {
"get": {
"description": "Returns the merged (defaults + overrides) config file in json.",
"operationId": "GetConfig",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"description": "The merged config file in json."
},
"default": {
"content": {},
"description": "Unknown Error"
}
},
"summary": "Gets the merged config file.",
"tags": [
"private"
]
}
},
"/debug/settings/pprof": {
"get": {
"description": "Retrieves the current settings for blocking and mutex profiles",
Expand Down
30 changes: 15 additions & 15 deletions daemon/algod/api/server/v2/generated/data/routes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading