-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed error on withKeys #6247
fixed error on withKeys #6247
Conversation
node/node.go
Outdated
@@ -960,6 +960,10 @@ func (n *Node) GetAccountWithKeys(address string, options api.AccountQueryOption | |||
return api.AccountResponse{}, api.BlockInfo{}, err | |||
} | |||
|
|||
if accInfo.account == nil || accInfo.account.DataTrie() == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this method only used when options.WithKeys is set?
if yes then all good, otherwise maybe you need to move the check for DataTrie in the code block starting at line 968
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved inside the if on line 968
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal allin test: 1.7.12-2a6916fbce -> MX-15556-Bugfix-Account-Wi-3dc4427bd2
--- Specific errors ---
block hash does not match 2133
wrong nonce in block 878
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 1
receipts hash missmatch 0
/------/
--- Statistics ---
Nr. of all ERRORS: 0
Nr. of all WARNS: 599
Nr. of new ERRORS: 0
Nr. of new WARNS: 17
Nr. of PANICS: 0
/------/
--- ERRORS ---
/------/
--- WARNINGS ---
/------/
} | ||
|
||
if check.IfNil(userAccount.DataTrie()) { | ||
return map[string]string{}, api.BlockInfo{}, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just here return you need to return the blockinfo, the others with error should still return zero values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Thank you very much for fixing this! Do you confirm that it would fix those two different cases: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal allin test: v1.7.13-dev-config-aebb55e8e0 -> MX-15556-Bugfix-Account-Wi-e520f75f28
--- Specific errors ---
block hash does not match 1165
wrong nonce in block 477
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0
/------/
--- Statistics ---
Nr. of all ERRORS: 1
Nr. of all WARNS: 675
Nr. of new ERRORS: 1
Nr. of new WARNS: 3
Nr. of PANICS: 0
/------/
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?