Skip to content

Conversation

@awrichar
Copy link
Contributor

@awrichar awrichar commented Oct 26, 2021

This is a rework of #279 - please see the original notes on that PR, which still apply here.

Falls under architecture item #218.

It contains the commits from #283 and #296 as pre-requisites, so those should be reviewed first. Only the last 2 commits are net new code.

@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #297 (d50aaa4) into main (04cd718) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #297   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          224       225    +1     
  Lines        12387     12421   +34     
=========================================
+ Hits         12387     12421   +34     
Impacted Files Coverage Δ
internal/assets/manager.go 100.00% <ø> (ø)
pkg/fftypes/event.go 100.00% <ø> (ø)
pkg/fftypes/message.go 100.00% <ø> (ø)
internal/assets/token_transfer.go 100.00% <100.00%> (ø)
internal/events/event_manager.go 100.00% <100.00%> (ø)
internal/events/operation_update.go 100.00% <100.00%> (ø)
internal/events/tokens_transferred.go 100.00% <100.00%> (ø)
internal/orchestrator/bound_callbacks.go 100.00% <100.00%> (ø)
internal/orchestrator/orchestrator.go 100.00% <100.00%> (ø)
internal/syncasync/sync_async_bridge.go 100.00% <100.00%> (ø)
... and 2 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 04cd718...d50aaa4. Read the comment docs.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
The message is now stashed away on the Operation inputs, then loaded and
sent by the event manager if the transfer succeeds.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
type: array
state:
enum:
- notready
Copy link
Contributor

Choose a reason for hiding this comment

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

No big objectection to notready, but in general I have a bell that pings when I see a negative.
Wonder if any of these would work?

  • staged
  • blocked
  • preprocessing
  • initializing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, actually staged was my first take on this. Maybe should go back to that.

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.

Looks great 👍
One minor spelling related question to think about, and see if you want to make a change or not.

}

// Special handling for OpTypeTokenTransfer, which writes an event when it fails
if op.Type == fftypes.OpTypeTokenTransfer && txState == fftypes.OpStatusFailed {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mental note (not suggesting any change): the next time we find this pattern, we might want to do something a little generic around failure event mapping, rather than building a bunch of switches down here.

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.

👍 marking approval here to allow merging when the spelling change and. merge conflicts are done.

@awrichar awrichar merged commit 4f62da7 into hyperledger:main Nov 1, 2021
@awrichar awrichar deleted the failtransfer branch November 1, 2021 14:09
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