diff --git a/basilisk/basilisk.h b/basilisk/basilisk.h index c4713cc91..1a7e8c48a 100755 --- a/basilisk/basilisk.h +++ b/basilisk/basilisk.h @@ -16,7 +16,7 @@ #ifndef H_BASILISK_H #define H_BASILISK_H -#define BASILISK_DISABLESENDTX +//#define BASILISK_DISABLESENDTX #define BASILISK_DISABLEWAITTX #include "../iguana/iguana777.h" diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 933a19b0d..f1ec87c1b 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -318,10 +318,10 @@ int32_t basilisk_rawtx_spendscript(struct supernet_info *myinfo,int32_t height,s for (i=0; idatalen; i++) printf("%02x",rawtx->txbytes[i]); printf(" <- rawtx\n"); - printf("%s rawtx data compare error, len %d vs %d\n",rawtx->name,rawtx->datalen,datalen); - return(-1); + printf("%s rawtx data compare error, len %d vs %d <<<<<<<<<< warning\n",rawtx->name,rawtx->datalen,datalen); + //return(-1); } - if ( (txobj= bitcoin_data2json(rawtx->coin,height,&rawtx->signedtxid,&rawtx->msgtx,rawtx->extraspace,sizeof(rawtx->extraspace),rawtx->txbytes,rawtx->datalen,0,suppress_pubkeys)) != 0 ) + if ( (txobj= bitcoin_data2json(rawtx->coin,height,&rawtx->signedtxid,&rawtx->msgtx,rawtx->extraspace,sizeof(rawtx->extraspace),data,datalen,0,suppress_pubkeys)) != 0 ) { rawtx->actualtxid = rawtx->signedtxid; char str[65]; printf("got txid.%s\n",bits256_str(str,rawtx->signedtxid)); diff --git a/iguana/iguana_interpreter.c b/iguana/iguana_interpreter.c index 8a49ed29a..f6226a8fa 100755 --- a/iguana/iguana_interpreter.c +++ b/iguana/iguana_interpreter.c @@ -1321,7 +1321,7 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip } else if ( op->opcode == IGUANA_OP_EQUALVERIFY || op->opcode == IGUANA_OP_EQUAL ) { - if ( iguana_cmp(&args[0],&args[1]) == 0 || 1 ) + if ( iguana_cmp(&args[0],&args[1]) == 0 ) iguana_pushdata(stacks,1,0,0); else iguana_pushdata(stacks,0,0,0); { diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index ae0aefad5..ff5f94ac9 100755 --- a/iguana/iguana_payments.c +++ b/iguana/iguana_payments.c @@ -393,7 +393,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS printf("insufficient total %.8f vs (%.8f + %.8f)\n",dstr(total),dstr(satoshis),dstr(txfee)); return(0); } - if ( (change= (total - (satoshis + txfee))) > 0 && (changeaddr == 0 || changeaddr[0] == 0) ) + if ( (change= (total - (satoshis + txfee))) > 10000 && (changeaddr == 0 || changeaddr[0] == 0) ) { printf("no changeaddr for %.8f\n",dstr(change)); free_json(vins); @@ -401,7 +401,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS return(0); } iguana_createvins(myinfo,coin,txobj,vins); - if ( change > 0 ) + if ( change > 10000 ) { if ( iguana_addressvalidate(coin,&addrtype,changeaddr) < 0 ) { diff --git a/iguana/tests/sendtoaddress b/iguana/tests/sendtoaddress index 2ba8f8710..a7366aac7 100755 --- a/iguana/tests/sendtoaddress +++ b/iguana/tests/sendtoaddress @@ -1,2 +1,2 @@ -curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RKk3hmkHr3khf2aQRZW51oxnzFVHsQe4hf\", 0.001, \"testcomment\", \"sendcomment\"]}" +curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RVQV5spiARDTqfwBCxstWnMbrT6Q8mhRYz\", 0.15, \"testcomment\", \"sendcomment\"]}"