Skip to content

Conversation

@peterbroadhurst
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2022

Codecov Report

Merging #593 (800e716) into main (491c272) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 800e716 differs from pull request most recent head ef3a20f. Consider uploading reports for the commit ef3a20f to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #593   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          305       305           
  Lines        17983     18006   +23     
=========================================
+ Hits         17983     18006   +23     
Impacted Files Coverage Δ
pkg/fftypes/event.go 100.00% <ø> (ø)
internal/apiserver/route_get_events.go 100.00% <100.00%> (ø)
internal/assets/manager.go 100.00% <100.00%> (ø)
internal/assets/token_transfer.go 100.00% <100.00%> (ø)
internal/batch/batch_manager.go 100.00% <100.00%> (ø)
internal/batch/batch_processor.go 100.00% <100.00%> (ø)
internal/broadcast/definition.go 100.00% <100.00%> (ø)
internal/broadcast/manager.go 100.00% <100.00%> (ø)
internal/broadcast/message.go 100.00% <100.00%> (ø)
internal/config/config.go 100.00% <100.00%> (ø)
... and 43 more

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 491c272...ef3a20f. Read the comment docs.

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
for _, p := range d.processors {
processors = append(processors, p)
if !exists[p] {
processors = append(processors, p)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems fine... but why does it contain duplicates in the first place? Guess we can have a processor shared by more than one dispatcher?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for _, d := range bm.dispatchers {

This is iterating over a map, where a dispatcher can register itself multiple times.

I've updated the code to maintain a list as well as a map, to avoid this confusion

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks for the tweak

Copy link
Contributor

@awrichar awrichar left a comment

Choose a reason for hiding this comment

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

Marking approved with notes to fix a few small items

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst peterbroadhurst merged commit e05e166 into hyperledger:main Mar 11, 2022
@peterbroadhurst peterbroadhurst deleted the event-lookup-cache branch March 11, 2022 22:20
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.

3 participants