Skip to content

Commit

Permalink
Fix auditor building problems
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Nov 30, 2018
1 parent b34dcca commit 981c615
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/agent_auditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func newAgentAuditorCommand(ctx *agentContext) *cobra.Command {
auditorConfig.APIKey = apiKey
auditorConfig.QEDEndpoints = qedEndpoints

auditor, err := monitor.NewAuditor(auditorConfig)
auditor, err := auditor.NewAuditor(auditorConfig)
if err != nil {
log.Fatalf("Failed to start the QED monitor: %v", err)
}
Expand Down
14 changes: 11 additions & 3 deletions gossip/auditor/auditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ import (
"github.com/bbva/qed/protocol"
)

type QueryTask struct {
Start, End uint64
StartSnapshot, EndSnapshot *protocol.Snapshot
}

func (q *QueryTask) Do() {
}

type Config struct {
QEDEndpoints []string
APIKey string
Expand Down Expand Up @@ -62,7 +70,7 @@ func NewAuditor(conf *Config) (*Auditor, error) {
return auditor, nil
}

type QuerTask interface {
type QuerTasker interface {
Do(*protocol.BatchSnapshots)
}

Expand Down Expand Up @@ -97,8 +105,8 @@ func (t *MembershipTask) Do() {
// retry
log.Errorf("Error executing incremental query: %v", err)
}
ok := t.client.Verify(resp, t.StartSnapshot, t.S.Snapshot., hashing.NewSha256Hasher())
fmt.Printf("Membership\n", t.Start, t.End, ok)
ok := t.client.Verify(resp, t.S.Snapshot, hashing.NewSha256Hasher)
fmt.Printf("Membership\n" /*t.Start, t.End,*/, ok)
}

func (m Auditor) Process(b *protocol.BatchSnapshots) {
Expand Down

0 comments on commit 981c615

Please sign in to comment.