Browse Source

Merge remote-tracking branch 'refs/remotes/jl777/master'

dPoW2
usamir 8 years ago
parent
commit
c8dc9d8c90
  1. 2
      basilisk/basilisk.h
  2. 6
      basilisk/basilisk_swap.c
  3. 2
      iguana/iguana_interpreter.c
  4. 4
      iguana/iguana_payments.c
  5. 2
      iguana/tests/sendtoaddress

2
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"

6
basilisk/basilisk_swap.c

@ -318,10 +318,10 @@ int32_t basilisk_rawtx_spendscript(struct supernet_info *myinfo,int32_t height,s
for (i=0; i<rawtx->datalen; 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));

2
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);
{

4
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 )
{

2
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\"]}"

Loading…
Cancel
Save