From daafb9dc126de0eef086c9f689f21fc422afdb44 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Oct 2017 16:41:29 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 9be81c94a..2161106ae 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -163,7 +163,7 @@ uint32_t _LP_magic_check(bits256 hash,bits256 magic) bits256 pubkey,shared; pubkey = curve25519(magic,curve25519_basepoint9()); shared = curve25519(hash,pubkey); - return(shared.uints[1] & ~(1 << LP_MAGICBITS)); + return(shared.uints[1] & ((1 << LP_MAGICBITS)-1)); } bits256 LP_calc_magic(uint8_t *msg,int32_t len) @@ -202,7 +202,7 @@ int32_t LP_magic_check(uint8_t *msg,int32_t recvlen) vcalc_sha256(0,hash.bytes,msg,recvlen); memcpy(magic.bytes,&msg[recvlen],sizeof(magic)); val = _LP_magic_check(hash,magic); - printf("magicval = %d\n",val); + printf("magicval = %x\n",val); return(val == LP_BARTERDEX_VERSION); } return(-1);