tm: update to latest (#7376)

* update to latest tm

* fix tests
This commit is contained in:
Marko
2020-09-23 13:44:40 +00:00
committed by GitHub
parent 95317d2fd6
commit 5ce15cb963
14 changed files with 39 additions and 27 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package rpc
import (
"context"
"fmt"
"net/http"
"strconv"
@@ -62,7 +63,7 @@ func getBlock(clientCtx client.Context, height *int64) ([]byte, error) {
// header -> BlockchainInfo
// header, tx -> Block
// results -> BlockResults
res, err := node.Block(height)
res, err := node.Block(context.Background(), height)
if err != nil {
return nil, err
}
@@ -77,7 +78,7 @@ func GetChainHeight(clientCtx client.Context) (int64, error) {
return -1, err
}
status, err := node.Status()
status, err := node.Status(context.Background())
if err != nil {
return -1, err
}
+2 -1
View File
@@ -1,6 +1,7 @@
package rpc
import (
"context"
"fmt"
"net/http"
@@ -51,7 +52,7 @@ func getNodeStatus(clientCtx client.Context) (*ctypes.ResultStatus, error) {
return &ctypes.ResultStatus{}, err
}
return node.Status()
return node.Status(context.Background())
}
// NodeInfoResponse defines a response type that contains node status and version
+2 -1
View File
@@ -1,6 +1,7 @@
package rpc
import (
"context"
"fmt"
"net/http"
"strconv"
@@ -119,7 +120,7 @@ func GetValidators(clientCtx client.Context, height *int64, page, limit *int) (R
return ResultValidatorsOutput{}, err
}
validatorsRes, err := node.Validators(height, page, limit)
validatorsRes, err := node.Validators(context.Background(), height, page, limit)
if err != nil {
return ResultValidatorsOutput{}, err
}