mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
aezeed: publicly export the word
field in ErrUnknownMnenomicWord
In this commit, we publicly export the `word` field as it makes it easier to programmatically interact with the package when attempting to re-derive proper `cipherseed` instances. We also add a new `Index` field as well to provide additional context for programmatic manipulating of seeds.
This commit is contained in:
@@ -543,8 +543,12 @@ func TestDecipherUnknownMnenomicWord(t *testing.T) {
|
||||
t.Fatalf("expected ErrUnknownMnenomicWord instead got %T", err)
|
||||
}
|
||||
|
||||
if wordErr.word != "kek" {
|
||||
t.Fatalf("word mismatch: expected %v, got %v", "kek", wordErr.word)
|
||||
if wordErr.Word != "kek" {
|
||||
t.Fatalf("word mismatch: expected %v, got %v", "kek", wordErr.Word)
|
||||
}
|
||||
if int32(wordErr.Index) != randIndex {
|
||||
t.Fatalf("wrong index detected: expected %v, got %v",
|
||||
randIndex, wordErr.Index)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user