Skip to content

ledger: do not shadow db error in account lookup#4425

Merged
algorandskiy merged 2 commits into
algorand:masterfrom
algorandskiy:pavel/ledger-lookup-error
Aug 19, 2022
Merged

ledger: do not shadow db error in account lookup#4425
algorandskiy merged 2 commits into
algorand:masterfrom
algorandskiy:pavel/ledger-lookup-error

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

Summary

DB lookup might fail and acctupdates' lookup method return not original error but overwritten by another one.
This makes debugging a bit harder.

Test Plan

Existing tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 17, 2022

Codecov Report

Merging #4425 (996ffbf) into master (c1b6a03) will increase coverage by 0.03%.
The diff coverage is 46.15%.

@@            Coverage Diff             @@
##           master    #4425      +/-   ##
==========================================
+ Coverage   55.13%   55.16%   +0.03%     
==========================================
  Files         397      397              
  Lines       50073    50079       +6     
==========================================
+ Hits        27607    27627      +20     
+ Misses      20170    20156      -14     
  Partials     2296     2296              
Impacted Files Coverage Δ
ledger/acctupdates.go 69.89% <46.15%> (-0.03%) ⬇️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
network/wsPeer.go 67.67% <0.00%> (ø)
network/wsNetwork.go 64.89% <0.00%> (ø)
catchup/service.go 69.38% <0.00%> (+0.49%) ⬆️
cmd/tealdbg/debugger.go 73.49% <0.00%> (+0.80%) ⬆️
crypto/merkletrie/node.go 93.48% <0.00%> (+1.86%) ⬆️
crypto/merkletrie/trie.go 68.61% <0.00%> (+2.18%) ⬆️
util/db/dbutil.go 48.48% <0.00%> (+4.24%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

jannotti
jannotti previously approved these changes Aug 17, 2022
Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - should give us the more important error detail.

Comment thread ledger/acctupdates.go Outdated
Comment thread ledger/acctupdates.go
Copy link
Copy Markdown
Contributor Author

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed CR feedback

@algorandskiy algorandskiy requested a review from jannotti August 18, 2022 15:03
Comment thread ledger/acctupdates.go Outdated
@algorandskiy algorandskiy force-pushed the pavel/ledger-lookup-error branch from f840fb3 to 996ffbf Compare August 18, 2022 15:13
@jannotti jannotti self-requested a review August 18, 2022 15:15
Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants