diff --git a/accounts/manager.go b/accounts/manager.go index 24c4eac3cf..f5e39a7fb9 100644 --- a/accounts/manager.go +++ b/accounts/manager.go @@ -52,9 +52,14 @@ type Manager struct { lock sync.RWMutex } +// Config is a legacy struct which is not used +type Config struct { + InsecureUnlockAllowed bool // Unused legacy-parameter +} + // NewManager creates a generic account manager to sign transaction via various // supported backends. -func NewManager(backends ...Backend) *Manager { +func NewManager(config *Config, backends ...Backend) *Manager { // Retrieve the initial list of wallets from the backends and sort by URL var wallets []Wallet for _, backend := range backends { diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index 78f6812789..b564fa3b57 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -193,7 +193,7 @@ nodes. // makeAccountManager creates an account manager with backends func makeAccountManager(ctx *cli.Context) *accounts.Manager { cfg := loadBaseConfig(ctx) - am := accounts.NewManager() + am := accounts.NewManager(nil) keydir, isEphemeral, err := cfg.Node.GetKeyStoreDir() if err != nil { utils.Fatalf("Failed to get the keystore directory: %v", err) diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index e5d0243907..f570c5dc4c 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -416,7 +416,7 @@ func allBlobTxs(addr common.Address, config *params.ChainConfig) []txData { func newTestAccountManager(t *testing.T) (*accounts.Manager, accounts.Account) { var ( dir = t.TempDir() - am = accounts.NewManager() + am = accounts.NewManager(nil) b = keystore.NewKeyStore(dir, 2, 1) testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") ) diff --git a/node/node.go b/node/node.go index fb94475121..ec7382e725 100644 --- a/node/node.go +++ b/node/node.go @@ -130,7 +130,7 @@ func New(conf *Config) (*Node, error) { node.keyDirTemp = isEphem // Creates an empty AccountManager with no backends. Callers (e.g. cmd/geth) // are required to add the backends later on. - node.accman = accounts.NewManager() + node.accman = accounts.NewManager(nil) // Initialize the p2p server. This creates the node key and discovery databases. node.server.Config.PrivateKey = node.config.NodeKey() diff --git a/signer/core/api.go b/signer/core/api.go index 9280431603..def2d6041f 100644 --- a/signer/core/api.go +++ b/signer/core/api.go @@ -184,9 +184,7 @@ func StartClefAccountManager(ksLocation string, nousb, lightKDF bool, scpath str } } } - - // Clef doesn't allow insecure http account unlock. - return accounts.NewManager(backends...) + return accounts.NewManager(nil, backends...) } // MetadataFromContext extracts Metadata from a given context.Context