mirror of https://github.com/ethereum/go-ethereum
cmd/geth: remove unlock commandline flag (#30737)
This is one further step towards removing account management from `geth`. This PR deprecates the flag `unlock`, and makes the flag moot: unlock via geth is no longer possible.pull/30765/head
parent
ec280e030f
commit
a5f0001845
@ -1 +0,0 @@ |
|||||||
{"address":"f466859ead1932d743d622cb74fc058882e8648a","crypto":{"cipher":"aes-128-ctr","ciphertext":"cb664472deacb41a2e995fa7f96fe29ce744471deb8d146a0e43c7898c9ddd4d","cipherparams":{"iv":"dfd9ee70812add5f4b8f89d0811c9158"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":8,"p":16,"r":8,"salt":"0d6769bf016d45c479213990d6a08d938469c4adad8a02ce507b4a4e7b7739f1"},"mac":"bac9af994b15a45dd39669fc66f9aa8a3b9dd8c22cb16e4d8d7ea089d0f1a1a9"},"id":"472e8b3d-afb6-45b5-8111-72c89895099a","version":3} |
|
@ -1 +0,0 @@ |
|||||||
{"address":"f466859ead1932d743d622cb74fc058882e8648a","crypto":{"cipher":"aes-128-ctr","ciphertext":"cb664472deacb41a2e995fa7f96fe29ce744471deb8d146a0e43c7898c9ddd4d","cipherparams":{"iv":"dfd9ee70812add5f4b8f89d0811c9158"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":8,"p":16,"r":8,"salt":"0d6769bf016d45c479213990d6a08d938469c4adad8a02ce507b4a4e7b7739f1"},"mac":"bac9af994b15a45dd39669fc66f9aa8a3b9dd8c22cb16e4d8d7ea089d0f1a1a9"},"id":"472e8b3d-afb6-45b5-8111-72c89895099a","version":3} |
|
@ -1 +0,0 @@ |
|||||||
{"address":"7ef5a6135f1fd6a02593eedc869c6d41d934aef8","crypto":{"cipher":"aes-128-ctr","ciphertext":"1d0839166e7a15b9c1333fc865d69858b22df26815ccf601b28219b6192974e1","cipherparams":{"iv":"8df6caa7ff1b00c4e871f002cb7921ed"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":8,"p":16,"r":8,"salt":"e5e6ef3f4ea695f496b643ebd3f75c0aa58ef4070e90c80c5d3fb0241bf1595c"},"mac":"6d16dfde774845e4585357f24bce530528bc69f4f84e1e22880d34fa45c273e5"},"id":"950077c7-71e3-4c44-a4a1-143919141ed4","version":3} |
|
@ -1,76 +0,0 @@ |
|||||||
// Copyright 2020 The go-ethereum Authors
|
|
||||||
// This file is part of go-ethereum.
|
|
||||||
//
|
|
||||||
// go-ethereum is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// go-ethereum is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
// Package utils contains internal helper functions for go-ethereum commands.
|
|
||||||
package utils |
|
||||||
|
|
||||||
import ( |
|
||||||
"testing" |
|
||||||
) |
|
||||||
|
|
||||||
func TestGetPassPhraseWithList(t *testing.T) { |
|
||||||
t.Parallel() |
|
||||||
type args struct { |
|
||||||
text string |
|
||||||
confirmation bool |
|
||||||
index int |
|
||||||
passwords []string |
|
||||||
} |
|
||||||
tests := []struct { |
|
||||||
name string |
|
||||||
args args |
|
||||||
want string |
|
||||||
}{ |
|
||||||
{ |
|
||||||
"test1", |
|
||||||
args{ |
|
||||||
"text1", |
|
||||||
false, |
|
||||||
0, |
|
||||||
[]string{"zero", "one", "two"}, |
|
||||||
}, |
|
||||||
"zero", |
|
||||||
}, |
|
||||||
{ |
|
||||||
"test2", |
|
||||||
args{ |
|
||||||
"text2", |
|
||||||
false, |
|
||||||
5, |
|
||||||
[]string{"zero", "one", "two"}, |
|
||||||
}, |
|
||||||
"two", |
|
||||||
}, |
|
||||||
{ |
|
||||||
"test3", |
|
||||||
args{ |
|
||||||
"text3", |
|
||||||
true, |
|
||||||
1, |
|
||||||
[]string{"zero", "one", "two"}, |
|
||||||
}, |
|
||||||
"one", |
|
||||||
}, |
|
||||||
} |
|
||||||
for _, tt := range tests { |
|
||||||
t.Run(tt.name, func(t *testing.T) { |
|
||||||
t.Parallel() |
|
||||||
if got := GetPassPhraseWithList(tt.args.text, tt.args.confirmation, tt.args.index, tt.args.passwords); got != tt.want { |
|
||||||
t.Errorf("GetPassPhraseWithList() = %v, want %v", got, tt.want) |
|
||||||
} |
|
||||||
}) |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue