cmd/geth: rename variable 'extapi' (#27223)

rename parameter

In this case, the naming of "extapi" might create some confusion. Although it represents an External Signer Backend, its name could be mistaken for an API. In reality, it is a backend instance used for communicating with external signers. A better naming choice could be "extBackend" or "externalBackend" to more accurately describe that it is a backend instance rather than an API.
This commit is contained in:
joohhnnn 2023-05-08 15:01:14 +08:00 committed by GitHub
parent cc8d40c65f
commit 7ac08ba4e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,8 +288,8 @@ func setAccountManagerBackends(conf *node.Config, am *accounts.Manager, keydir s
// Assemble the supported backends // Assemble the supported backends
if len(conf.ExternalSigner) > 0 { if len(conf.ExternalSigner) > 0 {
log.Info("Using external signer", "url", conf.ExternalSigner) log.Info("Using external signer", "url", conf.ExternalSigner)
if extapi, err := external.NewExternalBackend(conf.ExternalSigner); err == nil { if extBackend, err := external.NewExternalBackend(conf.ExternalSigner); err == nil {
am.AddBackend(extapi) am.AddBackend(extBackend)
return nil return nil
} else { } else {
return fmt.Errorf("error connecting to external signer: %v", err) return fmt.Errorf("error connecting to external signer: %v", err)