mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
multi-account: add forEachKeyScope uitility iterator
This commit is contained in:
parent
169abd446c
commit
00c29c3936
1 changed files with 14 additions and 0 deletions
|
@ -2110,3 +2110,17 @@ func decodeHexStr(hexStr string) ([]byte, error) {
|
||||||
}
|
}
|
||||||
return decoded, nil
|
return decoded, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// forEachKeyScope calls the given function with each default key scopes
|
||||||
|
// breaking early on error.
|
||||||
|
func forEachKeyScope(fn func(scope waddrmgr.KeyScope) error) error {
|
||||||
|
|
||||||
|
for _, scope := range waddrmgr.DefaultKeyScopes {
|
||||||
|
err := fn(scope)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue