Skip to content

Conversation

@awrichar
Copy link
Contributor

@awrichar awrichar commented Oct 15, 2021

Part of #218.

Includes a new MessageSender interface that is used by asset manager, broadcast manager, private messaging,
and sync-async bridge. This allows cleaner tracking of the progress of resolving and sending a message, and
injection of hooks at particular spots in the flow (which is needed here to dispatch the transfer and message in
a specific order).

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Make the flows and method naming in these packages as similar as
possible, and attempt to clarify the branches that result in an early send
(within the DB transaction) vs a deferred send.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Introduce new types for Broadcast and PrivateMessage, which can track state
information as a message is resolved and sent.

Currently we have two types of "send" (Send or SendAndWait), but this will
also allow future customizations to the send flow.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Ensure the pieces are sent in the correct order and wait for both to be
confirmed.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@codecov-commenter
Copy link

Codecov Report

Merging #258 (7e2209a) into main (80f6839) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 7e2209a differs from pull request most recent head aafc76c. Consider uploading reports for the commit aafc76c to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##             main     #258    +/-   ##
========================================
  Coverage   99.53%   99.53%            
========================================
  Files         217      217            
  Lines       12245    12345   +100     
========================================
+ Hits        12188    12288   +100     
  Misses         42       42            
  Partials       15       15            
Impacted Files Coverage Δ
internal/privatemessaging/privatemessaging.go 100.00% <ø> (ø)
internal/apiserver/route_post_token_burn.go 100.00% <100.00%> (ø)
internal/apiserver/route_post_token_mint.go 100.00% <100.00%> (ø)
internal/assets/manager.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/privatemessaging/message.go 100.00% <100.00%> (ø)
internal/privatemessaging/recipients.go 100.00% <100.00%> (ø)
internal/syncasync/sync_async_bridge.go 100.00% <100.00%> (ø)
... and 1 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 80f6839...aafc76c. Read the comment docs.

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

This is great @awrichar - really cleans things up, and adds a valuable extra layer of structure

@peterbroadhurst peterbroadhurst merged commit 0245402 into hyperledger:main Oct 20, 2021
@peterbroadhurst peterbroadhurst deleted the transfermsg branch October 20, 2021 02:29
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