Skip to content

Conversation

@gupadhyaya
Copy link
Contributor

Fixes #4676

@gupadhyaya gupadhyaya added the kind:fix Attached to bug-fixing PRs label Oct 31, 2025
@gupadhyaya gupadhyaya marked this pull request as ready for review October 31, 2025 06:36
"github.com/celestiaorg/celestia-node/libs/utils"
)

var log = logging.Logger("core")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var log = logging.Logger("core")
var log = logging.Logger("nodebuilder/core")

defaultGRPCMessageSize = 64 * 1024 * 1024 // 64Mb

xtokenFileName = "xtoken.json"
xtokenFileName = "xtoken.json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u just array and loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? there are only two file names: xtoken.json or x-token.json

// Support "x-token" (preferred), "xtoken", and "token" JSON keys for maximum compatibility
auth := struct {
Token string `json:"x-token"`
XToken string `json:"x-token"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be simplified

Just construct the auth token when you successfully read from one of the expected file names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym? i am reading from the expected file names, but the token name can be either of these three (x-token | xtoken | token) hence the struct and unmarshal. can u clarify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:fix Attached to bug-fixing PRs

Projects

None yet

3 participants