aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go46
1 files changed, 1 insertions, 45 deletions
diff --git a/main.go b/main.go
index f60372f..b63f8fb 100644
--- a/main.go
+++ b/main.go
@@ -14,51 +14,7 @@ func main() {
Key: "sum.golang.org+033de0ae+Ac4zctda0e5eza+HJyk9SxEdh+s3Ux18htTTAD8OuAn8",
})
- if err := mon.Watch(10 * time.Second); err != nil {
+ if err := mon.Watch(1 * time.Minute); err != nil {
log.Printf("AUDIT FAILED: %v", err)
}
}
-
-// func monitor(db *database) error {
-// log.Printf("starting monitor for %s", db.host)
-
-// client := sumdb.NewClient(db)
-
-// tree, err := client.FetchLatest()
-// if err != nil {
-// return err
-// }
-// log.Printf("got latest: N=%d, Hash=%s", tree.N, tree.Hash)
-
-// if err := client.FetchTreeProof(tree); err != nil {
-// return err
-// }
-
-// // fetch all entries in the tree according to the STH
-// // entries := client.Entries(nil, latest)
-
-// // confirm the tree made from the entries produces the same hash as the STH
-// // IF NOT: the server has signed invalid data
-
-// // prev := latest
-// for {
-// // await a new STH
-// // prev = latest
-// time.Sleep(db.pollInterval)
-// log.Printf("checking %s for new STH...", db.host)
-// // awaitNewSTH()
-
-// // latest, err := client.Latest()
-// // if err != nil {
-// // return err
-// // }
-
-// // fetch all NEW entries between prev and latest
-// // if unavailable for an extended period, this should be viewed as misbehavior
-// // entries := client.Entries(prev, latest)
-
-// // fetch a consistency proof for the new STH with the previous STH
-// // verify consistency proof
-// // verify the new entries generate the corresponding elements in the consistency proof
-// }
-// }