From 5266671c72a52cee5e4880676ba7b2d0cdc7872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 23 Jan 2017 22:01:18 +0100 Subject: [PATCH] Fix POW --- test/test_p2p_connection.ml | 5 ++--- test/test_p2p_connection_pool.ml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test_p2p_connection.ml b/test/test_p2p_connection.ml index 2dda0293a..c0d6dbf19 100644 --- a/test/test_p2p_connection.ml +++ b/test/test_p2p_connection.ml @@ -14,14 +14,13 @@ open Error_monad open P2p_types include Logging.Make (struct let name = "test-p2p-connection" end) -let proof_of_work_target = - Crypto_box.make_target [Int64.shift_left 1L 48] +let proof_of_work_target = Crypto_box.make_target 16. let id1 = Identity.generate proof_of_work_target let id2 = Identity.generate proof_of_work_target let id0 = (* Luckilly, this will be an insuficient proof of work! *) - Identity.generate (Crypto_box.make_target []) + Identity.generate (Crypto_box.make_target 0.) let versions = Version.[{ name = "TEST" ; minor = 0 ; major = 0 }] diff --git a/test/test_p2p_connection_pool.ml b/test/test_p2p_connection_pool.ml index f46541a47..4663e9a5e 100644 --- a/test/test_p2p_connection_pool.ml +++ b/test/test_p2p_connection_pool.ml @@ -126,7 +126,7 @@ let run_net config repeat points addr port = let make_net points repeat n = let point, points = Utils.select n points in - let proof_of_work_target = Crypto_box.make_target [] in + let proof_of_work_target = Crypto_box.make_target 0. in let identity = Identity.generate proof_of_work_target in let config = P2p_connection_pool.{ identity ;