uint64 height (Refs #911)

This commit is contained in:
Anton Kaliaev
2017-11-30 13:08:38 -06:00
committed by Ethan Buchman
parent b2489b4318
commit b3492356e6
64 changed files with 296 additions and 270 deletions

View File

@ -9,7 +9,7 @@ type Provider interface {
// store of trusted commits.
StoreCommit(fc FullCommit) error
// GetByHeight returns the closest commit with height <= h.
GetByHeight(h int) (FullCommit, error)
GetByHeight(h uint64) (FullCommit, error)
// GetByHash returns a commit exactly matching this validator hash.
GetByHash(hash []byte) (FullCommit, error)
// LatestCommit returns the newest commit stored.
@ -55,7 +55,7 @@ func (c cacheProvider) StoreCommit(fc FullCommit) (err error) {
// Thus, we query each provider in order until we find an exact match
// or we finished querying them all. If at least one returned a non-error,
// then this returns the best match (minimum h-h').
func (c cacheProvider) GetByHeight(h int) (fc FullCommit, err error) {
func (c cacheProvider) GetByHeight(h uint64) (fc FullCommit, err error) {
for _, p := range c.Providers {
var tfc FullCommit
tfc, err = p.GetByHeight(h)