Skip to content

Conversation

@positiveblue
Copy link
Contributor

Fixes #428
Depends on #427

rpcserver.go Outdated
[][]byte, 0, len(dbOrder.Details().AllowedNodeIDs),
)
for _, nodeID := range dbOrder.Details().AllowedNodeIDs {
allowedNodeIDs = append(allowedNodeIDs, nodeID[:])
Copy link
Contributor

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.

Copy link
Contributor Author

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/
Copy link
Contributor Author

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

Copy link
Contributor

@jbrill jbrill left a 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.

@positiveblue positiveblue merged commit cf4ca47 into lightninglabs:master Jan 9, 2023
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.

rpc: allowed/not Allowed node ids not populated when listing orders.

3 participants