mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Proof uses uint64 for blockHeight
This commit is contained in:
@@ -3,9 +3,9 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/abci/server"
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -61,7 +61,7 @@ func (app *ChainAwareApplication) Query(query []byte) types.Result {
|
||||
return types.NewResultOK([]byte(Fmt("%d,%d", app.beginCount, app.endCount)), "")
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) Proof(key []byte, blockHeight int64) types.Result {
|
||||
func (app *ChainAwareApplication) Proof(key []byte, blockHeight uint64) types.Result {
|
||||
return types.NewResultOK(nil, Fmt("Proof is not supported"))
|
||||
}
|
||||
|
||||
|
@@ -3,8 +3,8 @@ package counter
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
type CounterApplication struct {
|
||||
@@ -84,6 +84,6 @@ func (app *CounterApplication) Query(query []byte) types.Result {
|
||||
return types.ErrUnknownRequest.SetLog(Fmt("Invalid nonce. Expected hash or tx, got %v", queryStr))
|
||||
}
|
||||
|
||||
func (app *CounterApplication) Proof(key []byte, blockHeight int64) types.Result {
|
||||
func (app *CounterApplication) Proof(key []byte, blockHeight uint64) types.Result {
|
||||
return types.NewResultOK(nil, Fmt("Proof is not supported"))
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ func (app *DummyApplication) Query(query []byte) types.Result {
|
||||
return types.NewResultOK(wire.JSONBytes(queryResult), "")
|
||||
}
|
||||
|
||||
func (app *DummyApplication) Proof(key []byte, blockHeight int64) types.Result {
|
||||
func (app *DummyApplication) Proof(key []byte, blockHeight uint64) types.Result {
|
||||
// TODO: when go-merkle supports querying older blocks without possible panics,
|
||||
// we should store a cache and allow a query. But for now it is impossible.
|
||||
// And this is just a Dummy application anyway, what do you expect? ;)
|
||||
|
@@ -6,11 +6,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/tendermint/abci/types"
|
||||
. "github.com/tendermint/go-common"
|
||||
dbm "github.com/tendermint/go-db"
|
||||
"github.com/tendermint/go-merkle"
|
||||
"github.com/tendermint/go-wire"
|
||||
"github.com/tendermint/abci/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -93,7 +93,7 @@ func (app *PersistentDummyApplication) Query(query []byte) types.Result {
|
||||
return app.app.Query(query)
|
||||
}
|
||||
|
||||
func (app *PersistentDummyApplication) Proof(key []byte, blockHeight int64) types.Result {
|
||||
func (app *PersistentDummyApplication) Proof(key []byte, blockHeight uint64) types.Result {
|
||||
return app.app.Proof(key, blockHeight)
|
||||
}
|
||||
|
||||
|
@@ -35,6 +35,6 @@ func (app *NilApplication) Query(query []byte) types.Result {
|
||||
return types.NewResultOK(nil, "")
|
||||
}
|
||||
|
||||
func (app *NilApplication) Proof(key []byte, blockHeight int64) types.Result {
|
||||
func (app *NilApplication) Proof(key []byte, blockHeight uint64) types.Result {
|
||||
return types.NewResultOK(nil, "")
|
||||
}
|
||||
|
Reference in New Issue
Block a user