Conversation
There was a problem hiding this comment.
- this isn't python world and no one is using underscore naming
- if you can, use a single action word instead of two or more
- search for RESTful API endpoint naming convention and pick something that makes sense
There was a problem hiding this comment.
The current horizon version uses underscore in an endpoint. if they can, surely we can too. refer to https://github.com/stellar/go/blob/009e6e45c9f514e8e4f102461fbaefdf92b4f448/services/horizon/internal/web.go#L179
There was a problem hiding this comment.
there's also account_id used in Horizon responses. Check the difference and keep it consistent with the rest of the responses Horizon does.
There was a problem hiding this comment.
from what I gather, "id" is used to identify the page returned. in some cases, its the account id but in others, it might a tx hash or another identifier for the page. In other words, I'll need to use account_id instead of id.
There was a problem hiding this comment.
if Action is a struct, use a pointer. if it's an interface it's ok
There was a problem hiding this comment.
its done exactly this way in all the other actions.
There was a problem hiding this comment.
break lines here like in the above functions
There was a problem hiding this comment.
when working with xdr. objects, do you need to work with copies or references?
There was a problem hiding this comment.
Test scenarios that we should test:
- master account which doesn't exist - test both endpoints
- master account which isn't linked to any other account - "
- matser account which is linked to another account - "
- matser account which is linked to two other accounts - "
- matser account which is linked to three other accounts - "
- test mass linking: you can use table test with the last three tests are, and test for linking 100+ accounts to a master account
edge cases:
- account A linked to B, which also links back to A - test all endpoints
- account A linked to B, account B linked to C - " + verify that A only shows B
- cyclical: account A linked to B, B linked to C, C linked to A - " + verify A only shows B
- repeat 1-3 but have A link to 3 normal accounts, and B as well to other 3 normal accounts. this is a "merge" of all test scenarios mention above this line.
There was a problem hiding this comment.
should you use a pointer in the type here? verify with other implementations that already exist in the codebase
There was a problem hiding this comment.
standard in go is to put comments on top of code, not side by side
There was a problem hiding this comment.
i would let @doodyparizada look at the queries as well
ad7bf31 to
d07df03
Compare
0a9d8e6 to
2ea662c
Compare
45a2e7b to
872fecd
Compare
No description provided.