waku/v2/protocol/rln/keystore/keystore.go
Function save
has 8 return statements (exceeds 4 allowed). Open
Open
func save(keystore *AppKeystore, path string) error {
// We first backup the current keystore
_, err := os.Stat(path)
if err == nil {
err := os.Rename(path, path+".bkp")
Method AppKeystore.GetMembershipCredentials
has 7 return statements (exceeds 4 allowed). Open
Open
func (k *AppKeystore) GetMembershipCredentials(keystorePassword string, index *rln.MembershipIndex, filterMembershipContract MembershipContractInfo) (*MembershipCredentials, error) {
// If there is only one, and index to laod nil, assume 0,
// if there is more than one, complain if the index to load is nil
var key Key
Method AppKeystore.AddMembershipCredentials
has 6 return statements (exceeds 4 allowed). Open
Open
func (k *AppKeystore) AddMembershipCredentials(newCredential MembershipCredentials, password string) error {
credentials, err := k.GetMembershipCredentials(password, &newCredential.TreeIndex, newCredential.MembershipContractInfo)
if err != nil {
return err
}
Function New
has 5 return statements (exceeds 4 allowed). Open
Open
func New(path string, appInfo AppInfo, logger *zap.Logger) (*AppKeystore, error) {
logger = logger.Named("rln-keystore")
_, err := os.Stat(path)
if err != nil {