Diff
Not logged in

Differences From:

File src/verify.c part of check-in [75c476ccd1] - Work on network synchronization by drh on 2007-07-23 20:33:04. [view]

To:

File src/verify.c part of check-in [1245b42ba3] - Fix the test-verify command so that it ignores phantoms. by drh on 2007-08-01 15:13:52. [view]

@@ -36,19 +36,21 @@
 ** that everything is OK.
 */
 static void verify_rid(int rid){
   Blob uuid, hash, content;
+  if( db_int(0, "SELECT size FROM blob WHERE rid=%d", rid)<0 ){
+    return;  /* No way to verify phantoms */
+  }
   blob_zero(&uuid);
   db_blob(&uuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
   if( blob_size(&uuid)!=UUID_SIZE ){
     fossil_panic("not a valid rid: %d", rid);
   }
   content_get(rid, &content);
   sha1sum_blob(&content, &hash);
-/*  blob_reset(&content); */
+  blob_reset(&content);
   if( blob_compare(&uuid, &hash) ){
-printf("content=[%s]\n", blob_str(&content));
-    fossil_panic("hash of rid %d (%b) does not match its uuid (%b)",
+    fossil_fatal("hash of rid %d (%b) does not match its uuid (%b)",
                   rid, &hash, &uuid);
   }
   blob_reset(&uuid);
   blob_reset(&hash);