-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: populate allowed/not allowed node ids when listing orders #429
Conversation
rpcserver.go
Outdated
[][]byte, 0, len(dbOrder.Details().AllowedNodeIDs), | ||
) | ||
for _, nodeID := range dbOrder.Details().AllowedNodeIDs { | ||
allowedNodeIDs = append(allowedNodeIDs, nodeID[:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to explicitly copy()
these values to avoid issues with the loop variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, tests added for it 👍
To have this done everywhere with the same structure we could have a serialize.go
in each package that has the logic to serialize/deserialize obj from/to rpc and rpcserver.go
calls those. In that way we can keep the testing (with invalid inputs) in the package itself. Similar to the current rpc_parse.go
in orders but without splitting the logic between that file and the rpcserver.go
.
&& git config --global --add safe.directory /build | ||
# The last line is needed to ensure that go build is able to gather | ||
# information from the vsc used in the builds to get the commit hash. | ||
&& chmod -R 777 /tmp/build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverts a commit that I pushed by error in #426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 very comprehensive tests. I was unable to get the fields showing in an end to end test as it looks like there's some additional field marshaling we need to do subasta-side.
Fixes #428
Depends on #427