Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

the error of getting acctKey #939

Open
czh0526 opened this issue Jul 8, 2024 · 2 comments
Open

the error of getting acctKey #939

czh0526 opened this issue Jul 8, 2024 · 2 comments

Comments

@czh0526
Copy link

czh0526 commented Jul 8, 2024

in the file of waddrmgr/scoped_manager.go at line 1246:

    watchOnly := s.rootManager.WatchOnly() || acctInfo.acctKeyPriv != nil
if !s.rootManager.IsLocked() && !watchOnly {
	acctKey = acctInfo.acctKeyPriv
}

would it be written as this:

   watchOnly := s.rootManager.WatchOnly() || len(acctInfo.acctKeyPriv) == 0
if !s.rootManager.IsLocked() && !watchOnly {
	acctKey = acctInfo.acctKeyPriv
}
@Roasbeef
Copy link
Member

In this context, both variants are equivalent. Do you have a test case demonstrating otherwise?

@czh0526
Copy link
Author

czh0526 commented Jul 29, 2024

acctInfo.acctKeyPriv != nil is completed different with len(acctInfo.acctKeyPriv) == 0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants