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

This commit is contained in:
Olaoluwa Osuntokun committed 2018-03-13 12:57:13 -07:00
1 parent 0933f42674
commit ddfe73eedb
1 file changed
+6
+6
View File
@@ -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.