From: Victor Grishchenko (mughal) Date: Wed, 17 Feb 2010 18:12:11 +0000 (+0100) Subject: 2 bugs fixed X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=7d9a0ad2ec6ac7c4a2400a1e64de7e4a655eddfe;p=swift-upb.git 2 bugs fixed --- diff --git a/swift.cpp b/swift.cpp index 8076afd..f916e29 100644 --- a/swift.cpp +++ b/swift.cpp @@ -45,7 +45,7 @@ int main (int argc, char** argv) { case 'h': if (strlen(optarg)!=40) quit("SHA1 hash must be 40 hex symbols\n"); - root_hash = Sha1Hash(optarg); + root_hash = Sha1Hash(true,optarg); // FIXME ambiguity if (root_hash==Sha1Hash::ZERO) quit("SHA1 hash must be 40 hex symbols\n"); break; @@ -95,10 +95,6 @@ int main (int argc, char** argv) { LibraryInit(); - int file = Open(filename,root_hash); - // FIXME open err - printf("Root hash: %s\n", RootMerkleHash(file).hex().c_str()); - if (root_hash==Sha1Hash() && bindaddr==Address()) exit(0); @@ -114,10 +110,13 @@ int main (int argc, char** argv) { quit("cant listen to a port\n"); } - if (tracker!=Address()) SetTracker(tracker); + int file = Open(filename,root_hash); + // FIXME open err + printf("Root hash: %s\n", RootMerkleHash(file).hex().c_str()); + tint start_time = NOW; tint end_time = TINT_NEVER;