Skip to content

Commit

Permalink
Fix range for memberships and incrementals
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Mar 14, 2019
1 parent e607b09 commit 3d29308
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions balloon/balloon.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package balloon

import (
"errors"
"fmt"
"sync"

Expand Down Expand Up @@ -313,13 +314,18 @@ func (b Balloon) QueryConsistency(start, end uint64) (*IncrementalProof, error)

// Metrics
metrics.QedBalloonIncrementalTotal.Inc()
//timer := prometheus.NewTimer(metrics.QedBalloonIncrementalDurationSeconds)
//defer timer.ObserveDuration()

stats := metrics.Balloon
stats.AddFloat("QueryConsistency", 1)
var proof IncrementalProof

if start >= b.version ||
end >= b.version ||
start >= end {

return nil, errors.New("unable to process proof from history tree: invalid range")
}

proof.Start = start
proof.End = end
proof.Hasher = b.hasherF()
Expand Down

0 comments on commit 3d29308

Please sign in to comment.