Skip to content

Use a shared struct for Resolution proofer results#7092

Merged
jmhooper merged 3 commits intomainfrom
jmhooper-resolution-result
Oct 5, 2022
Merged

Use a shared struct for Resolution proofer results#7092
jmhooper merged 3 commits intomainfrom
jmhooper-resolution-result

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented Oct 5, 2022

This commit is a follow-up to #7088. It creates a struct which handles results for all proofers. This helps prevent issues where the result objects for proofers get out of sync.

[skip changelog]

This commit is a follow-up to #7088. It creates a struct which handles results for all proofers. This helps prevent issues where the result objects for proofers get out of sync.

[skip changelog]
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +40 to +43
errors = {}
verification_response.verification_errors.each do |key, value|
errors[key] ||= []
errors[key].push(value)
Copy link
Contributor

Choose a reason for hiding this comment

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

We could have the hash default to arrays and save a line if we wanted. (and also update to use my favorite, the shovel <<)

Suggested change
errors = {}
verification_response.verification_errors.each do |key, value|
errors[key] ||= []
errors[key].push(value)
errors = Hash.new { |h, k| h[k] = [] }
verification_response.verification_errors.each do |key, value|
errors[key] << value

@jmhooper jmhooper merged commit 451074b into main Oct 5, 2022
@jmhooper jmhooper deleted the jmhooper-resolution-result branch October 5, 2022 20:30
jmhooper added a commit that referenced this pull request Oct 5, 2022
This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

[skip changelog]
jmhooper added a commit that referenced this pull request Oct 6, 2022
This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

[skip changelog]
jskinne3 pushed a commit that referenced this pull request Oct 12, 2022
This commit is a follow-up to #7088. It creates a struct which handles results for all proofers. This helps prevent issues where the result objects for proofers get out of sync.

[skip changelog]
jskinne3 pushed a commit that referenced this pull request Oct 12, 2022
This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants