mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-06 16:17:11 +00:00
Proof uses uint64 for blockHeight
This commit is contained in:
+3
-3
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
type Client interface {
|
||||
@@ -21,7 +21,7 @@ type Client interface {
|
||||
DeliverTxAsync(tx []byte) *ReqRes
|
||||
CheckTxAsync(tx []byte) *ReqRes
|
||||
QueryAsync(tx []byte) *ReqRes
|
||||
ProofAsync(key []byte, blockHeight int64) *ReqRes
|
||||
ProofAsync(key []byte, blockHeight uint64) *ReqRes
|
||||
CommitAsync() *ReqRes
|
||||
|
||||
FlushSync() error
|
||||
@@ -31,7 +31,7 @@ type Client interface {
|
||||
DeliverTxSync(tx []byte) (res types.Result)
|
||||
CheckTxSync(tx []byte) (res types.Result)
|
||||
QuerySync(tx []byte) (res types.Result)
|
||||
ProofSync(key []byte, blockHeight int64) (res types.Result)
|
||||
ProofSync(key []byte, blockHeight uint64) (res types.Result)
|
||||
CommitSync() (res types.Result)
|
||||
|
||||
InitChainAsync(validators []*types.Validator) *ReqRes
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
// A stripped copy of the remoteClient that makes
|
||||
@@ -182,7 +182,7 @@ func (cli *grpcClient) QueryAsync(query []byte) *ReqRes {
|
||||
return cli.finishAsyncCall(req, &types.Response{&types.Response_Query{res}})
|
||||
}
|
||||
|
||||
func (cli *grpcClient) ProofAsync(key []byte, blockHeight int64) *ReqRes {
|
||||
func (cli *grpcClient) ProofAsync(key []byte, blockHeight uint64) *ReqRes {
|
||||
req := types.ToRequestProof(key, blockHeight)
|
||||
res, err := cli.client.Proof(context.Background(), req.GetProof(), grpc.FailFast(true))
|
||||
if err != nil {
|
||||
@@ -310,7 +310,7 @@ func (cli *grpcClient) CheckTxSync(tx []byte) (res types.Result) {
|
||||
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
||||
}
|
||||
|
||||
func (cli *grpcClient) ProofSync(key []byte, blockHeight int64) (res types.Result) {
|
||||
func (cli *grpcClient) ProofSync(key []byte, blockHeight uint64) (res types.Result) {
|
||||
reqres := cli.ProofAsync(key, blockHeight)
|
||||
if res := cli.checkErrGetResult(); res.IsErr() {
|
||||
return res
|
||||
|
||||
@@ -3,8 +3,8 @@ package abcicli
|
||||
import (
|
||||
"sync"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
types "github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
type localClient struct {
|
||||
@@ -99,7 +99,7 @@ func (app *localClient) QueryAsync(tx []byte) *ReqRes {
|
||||
)
|
||||
}
|
||||
|
||||
func (app *localClient) ProofAsync(key []byte, blockHeight int64) *ReqRes {
|
||||
func (app *localClient) ProofAsync(key []byte, blockHeight uint64) *ReqRes {
|
||||
app.mtx.Lock()
|
||||
res := app.Application.Proof(key, blockHeight)
|
||||
app.mtx.Unlock()
|
||||
@@ -202,7 +202,7 @@ func (app *localClient) QuerySync(query []byte) (res types.Result) {
|
||||
return res
|
||||
}
|
||||
|
||||
func (app *localClient) ProofSync(key []byte, blockHeight int64) (res types.Result) {
|
||||
func (app *localClient) ProofSync(key []byte, blockHeight uint64) (res types.Result) {
|
||||
app.mtx.Lock()
|
||||
res = app.Application.Proof(key, blockHeight)
|
||||
app.mtx.Unlock()
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -255,7 +255,7 @@ func (cli *socketClient) QueryAsync(query []byte) *ReqRes {
|
||||
return cli.queueRequest(types.ToRequestQuery(query))
|
||||
}
|
||||
|
||||
func (cli *socketClient) ProofAsync(key []byte, blockHeight int64) *ReqRes {
|
||||
func (cli *socketClient) ProofAsync(key []byte, blockHeight uint64) *ReqRes {
|
||||
return cli.queueRequest(types.ToRequestProof(key, blockHeight))
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ func (cli *socketClient) QuerySync(query []byte) (res types.Result) {
|
||||
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
||||
}
|
||||
|
||||
func (cli *socketClient) ProofSync(key []byte, blockHeight int64) (res types.Result) {
|
||||
func (cli *socketClient) ProofSync(key []byte, blockHeight uint64) (res types.Result) {
|
||||
reqres := cli.queueRequest(types.ToRequestProof(key, blockHeight))
|
||||
cli.FlushSync()
|
||||
if err := cli.Error(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user