cmd/lncli: ensure mnemonic for restore flow is exactly 24 words

This commit is contained in:
Olaoluwa Osuntokun 2018-03-13 12:42:44 -07:00
parent 0933f42674
commit ddfe73eedb
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -1139,6 +1139,12 @@ mnemonicCheck:
fmt.Println()
if len(cipherSeedMnemonic) != 24 {
return fmt.Errorf("wrong cipher seed mnemonic "+
"length: got %v words, expecting %v words",
len(CipherSeedMnemonic), 24)
}
// Additionally, the user may have a passphrase, that will also
// need to be provided so the daemon can properly decipher the
// cipher seed.