Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Error handling before logic in HasDescend #50

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

adlerjohn
Copy link
Member

Fixes #48.

Do error handling separately and before the function's logic. This avoids (true, non-nil) return value.

@adlerjohn adlerjohn self-assigned this Jul 25, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #50 (e415b7d) into master (2c90766) will decrease coverage by 0.36%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   86.05%   85.68%   -0.37%     
==========================================
  Files           6        6              
  Lines         466      468       +2     
==========================================
  Hits          401      401              
- Misses         37       39       +2     
  Partials       28       28              
Impacted Files Coverage Δ
deepsubtree.go 61.11% <0.00%> (-2.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c90766...e415b7d. Read the comment docs.

@adlerjohn adlerjohn requested review from musalbas and liamsi July 25, 2021 12:48
Copy link
Contributor

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @adlerjohn!

@adlerjohn adlerjohn merged commit ccbebc9 into master Jul 26, 2021
@adlerjohn adlerjohn deleted the adlerjohn/hasdescend_error_handling branch July 26, 2021 03:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(*SparseMerkleTree).HasDescend should firstly check the error from GetDescend before value comparisons
4 participants