diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 38821102dc..2845467163 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -44,6 +44,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" + "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core" @@ -83,6 +84,11 @@ var ( Value: DefaultConfigDir(), Usage: "Directory for Clef configuration", } + chainIdFlag = cli.Int64Flag{ + Name: "chainid", + Value: params.MainnetChainConfig.ChainID.Int64(), + Usage: "Chain id to use for signing (1=mainnet, 3=ropsten, 4=rinkeby, 5=Goerli)", + } rpcPortFlag = cli.IntFlag{ Name: "rpcport", Usage: "HTTP-RPC server listening port", @@ -178,7 +184,6 @@ func init() { logLevelFlag, keystoreFlag, configdirFlag, - utils.NetworkIdFlag, utils.LightKDFFlag, utils.NoUSBFlag, utils.RPCListenAddrFlag, @@ -402,9 +407,13 @@ func signer(c *cli.Context) error { } } } + log.Info("Starting signer", "chainid", c.GlobalInt64(chainIdFlag.Name), + "keystore", c.GlobalString(keystoreFlag.Name), + "light-kdf", c.GlobalBool(utils.LightKDFFlag.Name), + "advanced", c.GlobalBool(advancedMode.Name)) apiImpl := core.NewSignerAPI( - c.GlobalInt64(utils.NetworkIdFlag.Name), + c.GlobalInt64(chainIdFlag.Name), c.GlobalString(keystoreFlag.Name), c.GlobalBool(utils.NoUSBFlag.Name), ui, db, diff --git a/cmd/clef/tests/testsigner.js b/cmd/clef/tests/testsigner.js index ad33594951..d2f25da31c 100644 --- a/cmd/clef/tests/testsigner.js +++ b/cmd/clef/tests/testsigner.js @@ -28,8 +28,7 @@ init() function testTx(){ if( accts && accts.length > 0) { var a = accts[0] - var r = eth.signTransaction({from: a, to: a, value: 1, nonce: 1, gas: 1, gasPrice: 1}) - console.log("signing response", r) + eth.signTransaction({from: a, to: a, value: 1, nonce: 1, gas: 1, gasPrice: 1}) } } function testSignText(){ @@ -54,7 +53,7 @@ function test(){ var tests = [ testTx, testSignText, - testSignClique, + testClique, ] for( i in tests){ try{