diff --git a/agents/iguana b/agents/iguana new file mode 100755 index 000000000..a6e761e70 Binary files /dev/null and b/agents/iguana differ diff --git a/iguana/help/.tmpmarker b/iguana/help/.tmpmarker new file mode 100644 index 000000000..e69de29bb diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 627b036bf..28e4e97cf 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1108,7 +1108,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu for (hdrsi=0; hdrsibundlescount; hdrsi++) if ( (bp= coin->bundles[hdrsi]) == 0 || bp->balancefinish <= 1 || bp->ramchain.H.data == 0 || bp->ramchain.A == 0 || bp->ramchain.Uextras == 0 ) break; - if ( hdrsi <= coin->balanceswritten || hdrsi < refhdrsi ) + if ( hdrsi < coin->balanceswritten || hdrsi < refhdrsi ) return(0); numhdrsi = hdrsi; vupdate_sha256(balancehash.bytes,&vstate,0,0); @@ -1274,12 +1274,12 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int } bp->balancefinish = (uint32_t)time(NULL); bp->queued = 0; - iguana_validateQ(coin,bp); if ( bp->hdrsi >= coin->longestchain/coin->chain->bundlesize-1 ) { - iguana_balanceflush(coin,bp->hdrsi,3); - printf("balanceswritten.%d flushed bp->hdrsi %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,bp->hdrsi,coin->longestchain/coin->chain->bundlesize); + if ( iguana_balanceflush(coin,bp->hdrsi,3) > 0 ) + printf("balanceswritten.%d flushed bp->hdrsi %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,bp->hdrsi,coin->longestchain/coin->chain->bundlesize); } + iguana_validateQ(coin,bp); flag++; } else diff --git a/iguana/m_osx b/iguana/m_osx index 8335a6129..a759e1896 100755 --- a/iguana/m_osx +++ b/iguana/m_osx @@ -1 +1,3 @@ -gcc -Wno-deprecated -o ../agents/iguana -O2 *.c ../agents/libcrypto777.a -lcurl -lssl -lcrypto -lpthread -lm +gcc -Wno-deprecated -c -O2 *.c +gcc -Wno-deprecated -c main.c iguana777.c iguana_bundles.c +gcc -Wno-deprecated -o ../agents/iguana *.o ../agents/libcrypto777.a ../osx/libcurl.a ../osx/libssl.a ../osx/libcrypto.a ../osx/libsecp256k1.a ../osx/libgmp.a -lpthread -lm diff --git a/iguana/main.c b/iguana/main.c index 8ccd2d80d..eaca28050 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1090,11 +1090,11 @@ void iguana_main(void *arg) if ( 0 ) { #ifndef _WIN32 + signal(SIGABRT,sigabort_func); signal(SIGINT,sigint_func); signal(SIGILL,sigillegal_func); signal(SIGHUP,sighangup_func); //signal(SIGKILL,sigkill_func); - signal(SIGABRT,sigabort_func); signal(SIGQUIT,sigquit_func); signal(SIGCHLD,sigchild_func); signal(SIGALRM,sigalarm_func); diff --git a/osx/libcrypto.a b/osx/libcrypto.a new file mode 100644 index 000000000..4d3f97915 Binary files /dev/null and b/osx/libcrypto.a differ diff --git a/osx/libcurl.a b/osx/libcurl.a new file mode 100644 index 000000000..41192abb7 Binary files /dev/null and b/osx/libcurl.a differ diff --git a/osx/libgmp.a b/osx/libgmp.a new file mode 100644 index 000000000..3ed321825 Binary files /dev/null and b/osx/libgmp.a differ diff --git a/osx/libsecp256k1.a b/osx/libsecp256k1.a new file mode 100644 index 000000000..5b2034911 Binary files /dev/null and b/osx/libsecp256k1.a differ diff --git a/osx/libssl.a b/osx/libssl.a new file mode 100644 index 000000000..badeb5f21 Binary files /dev/null and b/osx/libssl.a differ