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

Add ORDER_PAYMENT network message #1654

Merged
merged 12 commits into from
Aug 8, 2019
Merged

Conversation

amangale
Copy link
Collaborator

This PR extracts the ORDER_PAYMENT network message code from the existing ethereum branch to be merged independently.

@amangale amangale requested a review from cpacia July 15, 2019 19:37
@cpacia cpacia added the ethereum Ethereum integration-related issues. label Jul 15, 2019
Copy link
Member

@cpacia cpacia left a comment

Choose a reason for hiding this comment

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

One required change to the output index above. Also make sure you fix the merge conflict. Other than that it LGTM.

Copy link
Member

@placer14 placer14 left a comment

Choose a reason for hiding this comment

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

Here are some additional thoughts to consider in this changeset. Thanks for pulling this part out of the larger ETH PR!

amangale added 3 commits July 19, 2019 18:53
…function to populate the txnOutputs for use in the order payment message handler
@coveralls
Copy link

coveralls commented Jul 25, 2019

Coverage Status

Coverage decreased (-0.06%) to 38.186% when pulling 75eed3e on order_payment_network_message into 9d5e4e3 on master.

@drwasho drwasho added the 🔍 readyForReview Issue or PR ready for code review prior to closing. label Jul 30, 2019
@drwasho drwasho added 🚧 in progress Issue or PR is currently being worked on and not in final form. and removed 🔍 readyForReview Issue or PR ready for code review prior to closing. labels Jul 30, 2019
if err != nil {
return txn, err
}
if len(addrs) == 0 {
Copy link
Member

@cpacia cpacia Jul 30, 2019

Choose a reason for hiding this comment

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

This code in each of the wallet implementations has a small chance of putting us in an unrecoverable state. For example, suppose sender of this transaction included a change output that was not of a standard address type. The change output is for their wallet, not ours, so technically this would still be a valid transaction on the network. However, our code would error here. Either where err != nil or where len(addrs) == 0.

So I think it's probably best to just set the address to "" in this case rather than error. Maybe log a warning as well.

@drwasho drwasho added 🔍 readyForReview Issue or PR ready for code review prior to closing. and removed 🚧 in progress Issue or PR is currently being worked on and not in final form. labels Jul 31, 2019
@placer14
Copy link
Member

placer14 commented Aug 1, 2019

I also don't see any godep updates at all. @cpacia if we're going to completely ignore that file, we should probably just remove it? I don't godep has any more use to us at this point. But that leaves the concern that we aren't managing the vendors folder properly which is greatly concerning. I don't know how we are ensuring that these commits are being included in the dependent libs.

@cpacia
Copy link
Member

cpacia commented Aug 1, 2019

Final TODO @amangale can you send a PR to to the upstream repos with the changes that are being included in vendor? Thanks

Copy link
Member

@placer14 placer14 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 looking ready to merge. I've looked at the upstream dependencies and I'm okay if we fix those later. There are a few error cases which should be remote edge scenarios but at least the logging looks good enough to give us enough info to understand how to better protect it if needed. If @cpacia can approve his change requests as well, we can merge this and resolve remaining nits in a following PR.

@placer14
Copy link
Member

placer14 commented Aug 6, 2019

Great work, @amangale, keeping up with the critiques. 🍻 Thanks!

@placer14 placer14 force-pushed the order_payment_network_message branch from 586b1c0 to 75eed3e Compare August 8, 2019 16:30
@placer14 placer14 merged commit 2367b14 into master Aug 8, 2019
@placer14 placer14 deleted the order_payment_network_message branch August 8, 2019 16:47
@placer14 placer14 changed the title Order payment network message Add ORDER_PAYMENT network message Aug 8, 2019
@placer14 placer14 removed the 🔍 readyForReview Issue or PR ready for code review prior to closing. label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ethereum Ethereum integration-related issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants