From 7d9a0ad2ec6ac7c4a2400a1e64de7e4a655eddfe Mon Sep 17 00:00:00 2001 From: "Victor Grishchenko (mughal)" Date: Wed, 17 Feb 2010 19:12:11 +0100 Subject: [PATCH] 2 bugs fixed --- swift.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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; -- 2.20.1