Browse Source

Fix utxorawtx

etomic
jl777 8 years ago
parent
commit
c8fd0de49b
  1. 7
      iguana/iguana_payments.c
  2. 2
      iguana/tests/dexgetO
  3. 2
      iguana/tests/dexsendrawtransaction

7
iguana/iguana_payments.c

@ -560,7 +560,14 @@ char *iguana_calcutxorawtx(struct supernet_info *myinfo,struct iguana_info *coin
printf("insufficient total %.8f vs (%.8f + %.8f)\n",dstr(total),dstr(satoshis),dstr(txfee)); printf("insufficient total %.8f vs (%.8f + %.8f)\n",dstr(total),dstr(satoshis),dstr(txfee));
return(0); return(0);
} }
if ( strcmp(coin->symbol,"KMD") == 0 )
{
if ( (interests= iguana_interests(myinfo,coin,vins)) != 0 )
{
total += interests; total += interests;
printf("boost total by interest %.8f\n",dstr(interests));
}
}
if ( (change= (total - (satoshis + txfee))) > 10000 && (changeaddr == 0 || changeaddr[0] == 0) ) if ( (change= (total - (satoshis + txfee))) > 10000 && (changeaddr == 0 || changeaddr[0] == 0) )
{ {
printf("no changeaddr for %.8f\n",dstr(change)); printf("no changeaddr for %.8f\n",dstr(change));

2
iguana/tests/dexgetO

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"gettxout\",\"vout\":1,\"txid\":\"fa3321ed55e8e96ba7221e9cc4bc54b735616649abcc9734bb73f505ee712884\",\"symbol\":\"KMD\"}" curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"gettxout\",\"vout\":1,\"txid\":\"4a1a2026718ac10bd11ccccbdd85f29faa5f0b7c3ab95a57dcf7040c5ca0420c\",\"symbol\":\"KMD\"}"

2
iguana/tests/dexsendrawtransaction

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"sendrawtransaction\",\"signedtx\":\"0100000001372105704c1303f4c928b788becce75b653b5e83d56fc25893f682875f9df00e010000006a47304402203c3e71c309fcf70d1b1b42207824b37cfec918930000b8d812844be9a8d06bae02202eafe0515f6cd775ba06be0fab6cea667a23508e69334310b959ebd7eade38c9012102320228e3f6f9b8db3d905bc21cefde46e72d622021b8fd40344ac2ab8346c287ffffffff02b0e20d000000000017a914077fa9d41d53cc38118b8280e97e4aee576d6e5a87c08c8a00000000001976a914838f4ea2f88f24b87247b72a1d66da225653e39788ac00000000\",\"symbol\":\"USD\"}" curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"sendrawtransaction\",\"signedtx\":\"01000000010c42a05c0c04f7dc575ab93a7c0b5faa9ff285ddcbcc1cd10bc18a7126201a4a010000006b483045022100814b44c4af1beeb7ab3abdd7dfd95216b48da2f47ded4137f3dca366db4a94bc0220686108f29cc1eea5c845b7571e01412a373e5077d448e021bac7e8a19ec451a20121025879c9eaa100984ee1faaeb55bcbafed5b1f565c35ed7ebaadcce0a8416e6263ffffffff0240420f00000000001976a914c5a58530ee7bec4f5ab9a8c0c63069484273276c88ac34955836020000001976a914971f98b33fb838faee190e2fab799440d8c5170288acf70ab858\",\"symbol\":\"KMD\"}"

Loading…
Cancel
Save