Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
201e57264d
  1. 2
      iguana/iguana777.c
  2. 2
      iguana/iguana_realtime.c
  3. 7
      iguana/iguana_secp.c
  4. 3
      iguana/main.c
  5. 11
      iguana/swaps/iguana_PAXswap.c

2
iguana/iguana777.c

@ -15,7 +15,7 @@
#include "iguana777.h"
#include "../../secp256k1-zkp/include/secp256k1.h"
#include "secp256k1/include/secp256k1.h"
const char *Hardcoded_coins[][3] = { { "BTC", "bitcoin", "0" }, { "BTCD", "BitcoinDark", "129" }, { "VPN", "VPNcoin", "129" }, { "LTC", "litecoin", "129" } , { "endmarker", "", "" } };

2
iguana/iguana_realtime.c

@ -235,7 +235,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
iguana_RTramchainfree(coin,coin->current);
return(0);
}
if ( coin->RTdatabad == 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi >= coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && ((coin->RTheight <= coin->blocks.hwmchain.height && time(NULL) > bp->lastRT) || time(NULL) > bp->lastRT+10) )
if ( coin->RTdatabad == 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi >= coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && ((coin->RTheight < coin->blocks.hwmchain.height && time(NULL) > bp->lastRT) || time(NULL) > bp->lastRT+10) )
{
if ( (block= bp->blocks[0]) == 0 || block->txvalid == 0 || block->mainchain == 0 )
{

7
iguana/iguana_secp.c

@ -18,8 +18,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "../includes/curve25519.h"
#include "../../secp256k1-zkp/include/secp256k1.h"
#include "../../secp256k1-zkp/include/secp256k1_recovery.h"
#include "secp256k1/include/secp256k1.h"
#include "secp256k1/include/secp256k1_recovery.h"
//#include "../../secp256k1-zkp/include/secp256k1.h"
//#include "../../secp256k1-zkp/include/secp256k1_recovery.h"
bits256 bitcoin_randkey(secp256k1_context *ctx)
{

3
iguana/main.c

@ -23,7 +23,8 @@
#include "../pnacl_main.h"
#include "iguana777.h"
#include "SuperNET.h"
#include "../../secp256k1-zkp/include/secp256k1.h"
#include "secp256k1/include/secp256k1.h"
//#include "../../secp256k1-zkp/include/secp256k1.h"
#undef fopen
#undef fclose

11
iguana/swaps/iguana_PAXswap.c

@ -48,8 +48,8 @@ char *instantdex_PAXswap(struct supernet_info *myinfo,struct exchange_info *exch
return(retstr);
}
#ifdef __APPLE__
#include "../../includes/secp256k1.h"
/*#ifdef __APPLE__
#include "../secp256k1/include/secp256k1.h"
//#include "../../crypto777/secp256k1/modules/rangeproof/pedersen_impl.h"
//#include "../../crypto777/secp256k1/modules/rangeproof/borromean_impl.h"
//#include "../../crypto777/secp256k1/modules/rangeproof/rangeproof_impl.h"
@ -76,7 +76,6 @@ static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_
#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
/* Limbs of 2^256 minus the secp256k1 order. */
#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
#define SECP256K1_N_C_1 (~SECP256K1_N_1)
#define SECP256K1_N_C_2 (1)
@ -84,7 +83,7 @@ static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_
static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) {
int yes = 0;
int no = 0;
no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */
no |= (a->d[3] < SECP256K1_N_3); //No need for a > check.
no |= (a->d[2] < SECP256K1_N_2);
yes |= (a->d[2] > SECP256K1_N_2) & ~no;
no |= (a->d[1] < SECP256K1_N_1);
@ -231,11 +230,11 @@ void test_pedersen(void) {
CHECK(secp256k1_pedersen_verify_tally(ctx, &cptr[1], 1, &cptr[0], 1, -INT64_MAX));
printf("g\n");
}
#endif
#endif*/
void ztest()
{
#ifdef __APPLE__
#ifdef notnow
return;
printf("ztests\n");
//test_pedersen();

Loading…
Cancel
Save