Skip to content
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

Go kosu/rpc docs #176

Merged
merged 15 commits into from Aug 1, 2019

go-kosu: fix rpc doc issues

  • Loading branch information
gchaincl committed Aug 1, 2019
commit 823667d375c890a8038288cb3e5af4236b0d53be
@@ -0,0 +1,5 @@
issues:
exclude-rules:
- path: rpc/service.go
linters:
- lll
@@ -109,7 +109,6 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"kosu_latestHeight", "id": 1}' lo
{"jsonrpc":"2.0","id":1,"result":260}
```
*/
// nolint:lll
func (s *Service) LatestHeight() (int64, error) {
res, err := s.abci.Block(nil)
if err != nil {
@@ -124,7 +123,7 @@ func (s *Service) LatestHeight() (int64, error) {

// AddOrders adds an array of Kosu orders to the network
/*
*** Example payload
### Example payload
```json
[{
"subContract":"0xebe8fdf63db77e3b41b0aec8208c49fa46569606",
@@ -156,14 +155,13 @@ func (s *Service) LatestHeight() (int64, error) {
}]`,
```
*** cURL example
### cURL example
```bash
url -X POST localhost:14341 \
curl -X POST localhost:14341 \
--data '{"jsonrpc":"2.0", "id": 1, "method": "kosu_addOrders", "params": [[<PAYLOAD>]]}' \
-H 'Content-Type: application/json'
```
*/
// nolint:lll
func (s *Service) AddOrders(orders []*types.TransactionOrder) error {
for _, order := range orders {
res, err := s.abci.BroadcastTxSync(order)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.