Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
61eaf2af90
  1. 151
      deprecated/obsolete.h
  2. 4
      iguana/SuperNET.h
  3. 127
      iguana/confs/BTCD_hdrs.txt
  4. 8
      iguana/iguana_msg.c
  5. 150
      iguana/iguana_payments.c
  6. 2
      iguana/iguana_realtime.c
  7. 2
      iguana/iguana_recv.c
  8. 119
      iguana/iguana_sign.c
  9. 55
      iguana/iguana_unspents.c
  10. 2
      iguana/iguana_volatiles.c
  11. 2
      iguana/tests/decoderawtransaction
  12. 2
      iguana/tests/listreceivedbyaddress
  13. 1
      includes/iguana_apideclares.h

151
deprecated/obsolete.h

@ -16541,6 +16541,157 @@ len = 0;
if ( num >= maxwaddrs || remains <= 0 )
break;
}
/*int64_t iguana_unspentset(struct supernet_info *myinfo,struct iguana_info *coin)
{
int64_t sum = 0,total; struct iguana_waccount *wacct,*tmp; struct iguana_waddress *waddr,*tmp2; int32_t n,numunspents = 0; cJSON *addresses = cJSON_CreateArray();
HASH_ITER(hh,myinfo->wallet,wacct,tmp)
{
HASH_ITER(hh,wacct->waddr,waddr,tmp2)
{
if ( waddr->addrtype != coin->chain->pubtype || (bits256_nonz(waddr->privkey) == 0 && waddr->scriptlen == 0) )
continue;
jaddstr(array,waddr->coinaddr);
total = 0;
n = 0;
iguana_pkhasharray(myinfo,coin,0,coin->minconfirms,coin->longestchain,&total,0,coin->bundlescount,waddr->rmd160,waddr->coinaddr,waddr->pubkey,coin->blocks.hwmchain.height - coin->minconfirms,(uint64_t *)coin->blockspace,&n,(int32_t)(sizeof(coin->blockspace)/sizeof(*waddr->unspents))-1000);
if ( n > 0 )
{
if ( waddr->unspents == 0 || waddr->maxunspents < n )
{
waddr->unspents = realloc(waddr->unspents,sizeof(*waddr->unspents) * n);
waddr->maxunspents = n;
}
memcpy(waddr->unspents,coin->blockspace,sizeof(*waddr->unspents) * n);
waddr->numunspents = n;
waddr->balance = total;
sum += total;
numunspents += n;
}
}
}
//printf("available %.8f\n",dstr(sum));
return(sum);
}*/
/*int32_t bitcoin_verifytx(struct iguana_info *coin,bits256 *signedtxidp,char **signedtx,char *rawtxstr,struct vin_info *V,int32_t numinputs)
{
int32_t len,maxsize,retval = -1; uint8_t *serialized,*serialized2;
struct iguana_msgtx msgtx; bits256 txid; char vpnstr[64];
len = (int32_t)strlen(rawtxstr);
maxsize = len + 32768;
serialized = calloc(1,maxsize), serialized2 = calloc(1,maxsize);
len >>= 1;
vpnstr[0] = 0;
decode_hex(serialized,len,rawtxstr);
memset(&msgtx,0,sizeof(msgtx));
if ( iguana_rwmsgtx(coin,0,0,serialized,maxsize,&msgtx,&txid,vpnstr) > 0 && numinputs == msgtx.tx_in )
{
if ( bitcoin_verifyvins(coin,signedtxidp,signedtx,&msgtx,serialized2,maxsize,V,SIGHASH_ALL) == 0 )
retval = 0;
else printf("bitcoin_verifytx: bitcoin_verifyvins error\n");
} else printf("bitcoin_verifytx: error iguana_rwmsgtx\n");
free(serialized), free(serialized2);
return(retval);
}
cJSON *iguana_signtx(struct supernet_info *myinfo,struct iguana_info *coin,bits256 *txidp,char **signedtxp,struct bitcoin_spend *spend,cJSON *txobj,cJSON *vins)
{
int32_t i,j,m,n,plen; char *rawtxstr,*pubkeystr,*spendstr; struct vin_info *V,*vp; bits256 txid; struct iguana_waccount *wacct; struct iguana_waddress *waddr; cJSON *vitem,*vinsobj,*pubkeys;
V = calloc(spend->numinputs,sizeof(*V));
if ( *signedtxp != 0 )
{
if ( txobj != 0 )
free_json(txobj);
txobj = bitcoin_hex2json(coin,&txid,0,*signedtxp);
if ( vins != 0 )
{
if ( jobj(txobj,"vin") != 0 )
jdelete(txobj,"vin");
jadd(txobj,"vin",iguana_createvins(myinfo,coin,txobj,vins));
}
//printf("bitcoin_hex2json (%s)\n",jprint(txobj,0));
free(*signedtxp);
}
vinsobj = jarray(&n,txobj,"vin");
for (i=0; i<spend->numinputs; i++) // N times less efficient, but for small number of inputs ok
{
vp = &V[i];
if ( i < n )
{
if ( (vitem= jitem(vinsobj,i)) != 0 && ((spendstr= jstr(vitem,"scriptPub")) != 0 || (spendstr= jstr(vitem,"scriptPubKey")) != 0) )
{
vp->spendlen = (int32_t)strlen(spendstr) >> 1;
decode_hex(vp->spendscript,vp->spendlen,spendstr);
} else spendstr = 0;
}
else vitem = 0;
vp->N = vp->M = 1;
if ( (rawtxstr= bitcoin_json2hex(myinfo,coin,&txid,txobj,0)) != 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( bits256_nonz(spend->inputs[i].privkeys[j]) != 0 )
{
vp->signers[j].privkey = spend->inputs[i].privkeys[j];
bitcoin_pubkey33(coin->ctx,vp->signers[j].pubkey,vp->signers[j].privkey);
}
else
{
vp->signers[j].pubkey[0] = 0;
break;
}
}
if ( vitem != 0 && (pubkeys= jarray(&m,vitem,"pubkeys")) != 0 )//spend->inputs[i].numpubkeys > 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( j < m && (pubkeystr= jstr(jitem(pubkeys,j),0)) != 0 && is_hexstr(pubkeystr,(int32_t)strlen(pubkeystr)) > 0 )
decode_hex(vp->signers[j].pubkey,(int32_t)strlen(pubkeystr)>>1,pubkeystr);
else if ( (plen= bitcoin_pubkeylen(spend->inputs[i].pubkeys[j])) > 0 )
memcpy(vp->signers[j].pubkey,spend->inputs[i].pubkeys[j],plen);
}
}
//if ( spend->inputs[i].spendlen > 0 )
// {
// memcpy(vp->spendscript,spend->inputs[i].spendscript,spend->inputs[i].spendlen);
// vp->spendlen = spend->inputs[i].spendlen;
// }
if ( spend->inputs[i].p2shlen > 0 )
{
memcpy(vp->p2shscript,spend->inputs[i].p2shscript,spend->inputs[i].p2shlen);
vp->p2shlen = spend->inputs[i].p2shlen;
}
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( vp->signers[j].coinaddr[0] == 0 && (plen= bitcoin_pubkeylen(spend->inputs[i].pubkeys[j])) > 0 )
{
bitcoin_address(vp->signers[j].coinaddr,coin->chain->pubtype,spend->inputs[i].pubkeys[j],plen);
}
}
if ( myinfo->expiration != 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( bits256_nonz(vp->signers[j].privkey) == 0 && vp->signers[j].coinaddr[0] != 0 )
{
if ( (waddr= iguana_waddresssearch(myinfo,coin,&wacct,vp->signers[j].coinaddr)) != 0 )
vp->signers[j].privkey = waddr->privkey;
}
}
}
vp->sequence = spend->inputs[i].sequence;
//printf("json2hex.(%s)\n",rawtxstr);
}
}
bitcoin_verifytx(coin,txidp,signedtxp,rawtxstr,V,spend->numinputs);
//printf("json2hex.(%s)\n",rawtxstr);
free(rawtxstr);
if ( *signedtxp != 0 && i != spend->numinputs )
free(*signedtxp), *signedtxp = 0;
free(V);
return(txobj);
}*/
#endif
#endif

4
iguana/SuperNET.h

@ -73,6 +73,8 @@ struct supernet_address
char NXTADDR[32],BTC[64],BTCD[64];
};
struct rawtx_queue { struct queueitem DL; cJSON *vins; uint32_t rawtxtag; char rawtx[]; };
struct supernet_info
{
char ipaddr[64],transport[8]; int32_t APISLEEP; int32_t iamrelay; uint32_t expiration,dirty;
@ -85,7 +87,7 @@ struct supernet_info
int32_t LBsock,PUBsock,reqsock,subsock,networktimeout,maxdelay;
uint16_t LBport,PUBport,reqport,subport,rpcport,publicRPC,argport;
//struct nn_pollfd pfd[SUPERNET_MAXAGENTS]; //struct relay_info active;
struct supernet_agent agents[SUPERNET_MAXAGENTS]; queue_t acceptQ;
struct supernet_agent agents[SUPERNET_MAXAGENTS]; queue_t acceptQ,rawtxQ;
int32_t numagents,numexchanges;
struct exchange_info *tradingexchanges[SUPERNET_MAXEXCHANGES];
struct iguana_waccount *wallet; void *ctx;

127
iguana/confs/BTCD_hdrs.txt

@ -1,4 +1,4 @@
1039011
1101511
0 0000044966f40703b516c5af180582d53f783bfd319bb045e2dc3e05ea695d46 a5d211145f8e6ba0920b2893d307c5d7c207ae0800a80955299678d1706ea8ac 000000000c4682089c916de89eb080a877566494d4009c0089baf35fe94de22f
500 000000000680a9a697eb71155b18a5827e0889fca28afb81fcbb46469ed7877e 79f80a8f54c6762d6408347c6dd7dfd2f8b8c191077c1d7881dfc5b7ec6a408e 0000000002b868fe717dc60b8d146de4d9aecf779b7314224908566e01847769
1000 0000000000000cf908c887020f8970b7fe952f8b81164d83a87621dfdb581d08 3356ec4296ff2f04281492b0dedbaed80edeb6dd9170b87230ff79f6b0daade7 0000000000001e7c6d28962a03b3d75ffa1355ecc6d3021893b2727a1ccfc669
@ -2078,3 +2078,128 @@
1038000 d4914856b50ec1c683af57b7ad17dedb0d6d496b1c3fd9e8ac44254f5097da80 da3578419c83ca27aea9e5aded3f037ea1796130d12a7031b589ca9ffe5a5fb0 982d02d1adfbafaaeef3ead73a8b760ef8cc4c18913aa2990df5578627e0c63f
1038500 4ef9de168a9cdf6e4074492cd69b15621990a9b1a731154a27c1df6c6eaa2f93 da919b8ccf4214f215cbfdf08bb7e568cc9329097d2275628cf7e870d8c1e9d3 93617d68bab22ad289cde335ed90604618792bd53cb844254c861f8a0f1e38e2
1039000 aabc1d300ccb7c5e20f99c58679d5801a86dfc53f489649a78d61d2780c1ed52 740ebeb1c46972cff11c9c488dcedb4b03b1b26af5bf11fd2f455cd50be8453f 886512ffb3b7ce603349d7ddca6f133e9de3b328f097b2a9b54933be8547e4b5
1039500 1983a2e59f7e6248803264d5a3d5d5d215ae8532edfd5d532c3a87d5dff90aa6 28ee7a4caf5585b7ecba4bce8b0a067927189f91264b6f61d40ed0ac070c4fea d36c42008a876af88c8756e4e1b81bbbd2967f15cfc97a9caf7e70f7b1c480b7
1040000 f3e2a0b028e42ae82e49bb92ea4695af9e8086a42b0fdf4703674709442af77c 766f9a2ab585a28d9fcc8a5b1a5ac73cce4a34a8c35ee49017ee1d005a2d5506 415a4eef34189b66dd62945c61ecdddbc6617979b767027be748f1045c45929b
1040500 5232a4ede825823ba1165ab340ef035a7283332854465224f7f46aec64bd1ead dd2390fd9549367fcef416b69e21b513cf2ea238588cd4e493b698ac0b588306 c419f9db6f156969425a0e1a9a4412f7d3a1763f9e045a9e0a628ddf9cbb6852
1041000 c35789e22c2cfa11323d5db2a608eae5f48439961d510bc279d1e6c2222e015a 1a30dda49c5a3b1e8fc9c1b7e8c40e75ef527f13e83a398a41cbd3bed39c3a21 652e2ffc28f71b7bf7d1fdeaa36a973cb7afa0e8ee3964a68df5bdca88444394
1041500 fba66082cac0bd85aa39fe56c7e3f25b58098dcdf71ad064bc1293c6a5be326f 9365e5fd1c055bf56fc73a599ccb8ad2d71c6c889da5d53a15ce287c9907efff 130f197d253f4486061c8b344933d4e6b9888af946ebfe5bdfa0d66be7afaa75
1042000 f960f144c580e372fbb20aebc7c7693e1647dde35631165f03ceca0402fd5394 f309ff65eddf5e85b4ea098a6d47a0cbcfcd553aca7e5092af04df2660216ecb d7fcea9da8cc94742d3a5e0b39100433fe0ace25f448153aa6fbe9af7aab2f21
1042500 bc1c318eb954e6ffd656b40aa2034aaa57510a47c70a26d4a64798b4242a96c3 f49366d3c65adf67d855e79a8b5f321bd43e969beaf8da624aaa444153e34804 1e1cab22f6b5519ae4265e0283f1079b2f209ce8c5288e9d2a247084e46a41ae
1043000 8e675a672f934f13443b463b09308f9857256bc5535c144411f5af2df9cc7ed1 320a8ccb3a1d44f07f16bf989a3348b980b2502e9dadbc1f7467779384e49ddc e2fb1c4a95ba177748c3732b0420eab1881b51fe2874b73e589cc7a08d565065
1043500 cc6046ba969972c5af0389612e75d8b289c113b4900681a7b26a19ec120f95e8 635b5848a1345f1cfe64bdd7d463d9cd09f9d075bfb2d04cfa805ece973dcdd3 172d5cfd06424e6ecc06b0eaa4b441d4257c20ac8826f65b6cf20a2c57377b11
1044000 df415157f07298c695d76b1ef2bd2ba6c6459dda30b6aac026a8492240163319 1430ac6d0d2753b35eed3cbc8885cebe65214a9179480748ae5c3857bcaa72fe 2d4b8f1a666c3f94f22ba93d18eca27b596ca5e66cdc3e7385c68fa151feffd5
1044500 dcd1e4bf92385427fb83f6430ada423739f5e79b50d9d54d2da7682349099d4d a565daeed39c5a0623391382793c6436a274f39b859797088521d7ae5df1b7ce 513aae8157476d212e99a19ca1c8e88008358b43434156e37053e69100e127bb
1045000 579743f2d5aa7780e4db1b3015190a235ba6d5f4e5ebae8d00142032a3db5ce3 310cd0259443ed2aad00773a3fe718fe05e30fa6a79be5d48600bd0dff0ea09f b7ecada86be2ad137b8e1f896dc2673f40b1e834e09351d6d40de96f32494ebb
1045500 8a9aa0f90288d2ef021cd7bc0ff79e851b3027305f2ef6c90bcb67be1d2ca664 01bc88af745ea0e33c5cf5d22cf1d6ca2cfba216e43b16fe090d7806b67da16d 340015f88c93cf427fe0ecac9385c31f6be182d4f06007091144e44ac05624ae
1046000 c72ccab7669a1c77adb96eac880c3b8b5505f76f54875c9ce63e5ec0a4466e52 c5f2bf64430c0a2cf5b0ebee135d44a84b63dc5161e5b6e3bf22994c6a2448bd 1f87c9f3afa87d527a897813ed828532601560b0b67e75e1fd040af0df8c7b18
1046500 3573934e82012b7ba458286dc61fc094ebaea2e6a44b6f75c628c223610200e3 0d902f09a9ca3b972e3820f74d83df311ba5b35e8c6fa1229ff8da974aec6e63 f360249b4cdd69f59573d023c5faf8b0fc1e6a0f5f9967b96ac34659ee72ffef
1047000 9380a4a18403d26d8ed097c1ee3c8d9deb40423a40c75ab5990088c7e5c6be5c 175b7c5aa160a7cc32bb88a1623cf5c740cd1963c2d52c2e108005e2c895a4b8 dfe7420133a6092210dfecaa74b30f29f0c980f74fd6205c0ad325b69d5cfe94
1047500 b3eb44a8d8c32ff51230776ef692ae2df253ea590e3ce094021965a48b923a9c 770af1fc30b4a95ac9afc82aef5959f9425d91fc27dea24aedc5f1d1bbbaae6d 6f6dac8855fac467d526bf3b7fae68e33a594acffb42301e8cfbc7fe6838163d
1048000 47a84fcee4a633f734f7197155fab73b0d6066752fee07ba18a3f1b2d2aff2bf ad93d2d3692df1b72ab9a4a0a306962127780d114e8ba39a8e102568906b61df adaf5605fc79d9153a915d37541d51b61fb849c9f0bbcba5164bcc1e930c9aa6
1048500 d80b9eef45c8bcdcfe112f4f398aa4141888fb4bf69794b419757256f7b9bfb0 c252f3198f625fe91d91dc5e3032446956d8de987b00d5d3ba008c3e092f6763 8518048f6083c29fb1e001fbe778ed185b87a988dcbe0c61cfa868365939b562
1049000 be562935777742d22230f2b13f1d885fcd3f3966af8baaf182673075aede0a9a 7a8940e33f897394ee39c5f9edf0b04d71f28a3e07a65011496024b64a91a70b a90c364c7302fafc86ce15d51b08167f9232c44e2a7744a7a674508a146bf7e2
1049500 450bc6a5f1b7d502c9a86ecb08ed3bf26c87149f6b6242deebf998ec1190dacb e496811cc6cab5c2b821d21ba29b71ca4256b228889e352e779a82aeea96df63 64fd7f1d78833ec1260e9b39249e9957207845d99bab950ef921a3a5fafdda46
1050000 a835e80973ca0240c06703a30433a139d200453a7296c24a22b62792d17ff2a1 44c9a74b2ad97727ae4f419a77804a88f9a3cb31bb3ae65e2b372040c1eb273e 95c578d836ef48bd93f58757d6c3b093acaa373f9654410f85dae1aefdd5d3fc
1050500 631b74a56a6719158926aca09aa8ab8cd89b61e563a5b6386ec6de5e782e926a 1e1c4fc04badc617cc382d6aadde8ae735277694e233a225634e2be077c97a2a fd4f6efdea193b035f4b5947404483b6930997bf8089d1661d9b9ef48c9887aa
1051000 1ec8fcfb9b6d6c602e2775686f04f1d39a768064ee6aeb65930bfee5b1a94e19 4f2f38f9f74bfd1ea8daf0ac5ffa8afb485436d5e4b35fd0742c454439b21488 f6311a3834e71c30635c01e0c45aacfcb2241780e3aa13f2c834a84f5afda969
1051500 73133e5c1408263f8053ed9a93ae7164dffc2381d3a7fa24cc78c29665b3bf39 a47a6e2a98fef063017953ee09b4471622b986b7fe8dc6d52adda451db9c852e fb14519af510b672ace64d3d250549fad14d1ed623dd0544bc541b7e3710e38b
1052000 20e08cce79f51cc9e5b0dd212f6cc3a0ad742244e58ce252600d286fe2415cc3 edcb3b3a1aff133bac74770612727bf2f15cfafab7c63dfbfe6f2378debda004 d47a434a2ba0524ee99b5664f66792b81fc9134f5ceb00e69efdf9a46f8142f4
1052500 37e19650eba3eb3e2967c2585147cc37714d24ac681a8b78d11f946ceca3c083 069c1246cc4290b4748b26b30446f3a7aae4ca9bd847d0f1be6a8dd07e89d52e dd01920c16ffd5ab35e7d670ff88cfc9bf348f0c85238643b8f04a2919978c7a
1053000 8a22777c8f3ee2b71fc33926cde2363be651b56f4886962d9aebf6e111ef4af5 2789aab47bf324a74e8ba9fe94951e5b3e8caa995f93f1c01a9e6f4e95783bc8 0b4d50b5fc9dd327976276cce10c407e52b7fb70cf03d233ed3e88dcd1d8d4c1
1053500 693b78182f2e9dfbf138a54fe519285ca8b5665dd630b9651d63010208cf1250 efd0a291bdd8f0928a31f4083021b5daf1fc5de4f7b1ccdf70b2c7f62c80c5c9 9800ab253ae43ff7d243ba35495517747e70d7da20a4a0d4691808ed669a95ca
1054000 7d052ca1210218d7316d2d9b82c15e8e57d59ac3d444fdd45dbf5e577f9b4c69 bee8ff913f9b231c0b34a55bf2381184d18389d43b1f6719227fd4d5c80d8b60 fcd0429b0f95329e6c482907dad4a9e4733c8860c129ba977299d6dfbbe45cbe
1054500 1b00ae5589d8eae631a21b715150b89a3786a33166cf0fb11e79f1c12b493e5b f8d95559f470788377237801e29369ebdd9b682ac289e43fc18ccb751ecbe29a 1d1b84b14c6aead094be828f14e8d90bb451216f84ce7c325641b3277276ba7d
1055000 6c92f01ed8c5f4247722230e045ae10ba6973c3f8d8ad66684852efdfd801234 59fb8eb1e18d1ed445f7378eacd8b02e92698d99c1ac4d1544e35d127134424e 527e64783b51c20f17908f8d4a5222f837061f839e5a35effaee8625110d96b7
1055500 655d624dd686c5c3f95a7e48687d3cc7f7e3623b02c1f8db8727e54186e16cef 508f0be15eadc58ee080897002ad681fc2fd2f4bd4e175a319807626603ed601 2a01b2336eb82c2d66c72dfa96f1bb4778d0a28b7c169c431a8030ffcb18056b
1056000 af11656c7cb4f7ff056efc8255205feb3ea12f96da9ac416e33b034e93241e42 a9d081e5eb78f1018e0a86b8c2c333989d375adb3f217df5ce8fe0dbcf84c5d4 6e3b76382e6e42804f19c5552c36c46ea24829dc035c16b0a138254a2c192aab
1056500 4f7ce26131a4923137977f716334a07a99d1fede466564c89aac75415eea0eb3 6723f6345fe576dcac1c5ccb5390321e317408c7dc34c4ddca7a6ac83c577ca1 1649fcd866bf63938016938d91a53248bf9a50db3fe7af3711beec8fc3ac573f
1057000 1fbe16214e11324f46064f3754e3189dc4e57e9aafe221ea7fa45627f0db2f2d 123d5e7d330c6dc7cf7a4b9efc6375736de9b6acd14e75205e72513a19e938de c7dc8a859791fb06bc5de694f4586affa038b1b065ceb3abec61ef4e27dd3c3f
1057500 2c742e483d8a978656e28a4b574fcac3264f040a569e8e141fb3b5f0de9585c7 301d401df39b752d5e5a7c3d11b8dc6f985b7f836a4f8e4a318631c45d6d4f6f eb5eea8f78367516258e9e79be1c491b84899dbd73b9469c862b115088f44e89
1058000 71060b474bbc2cccca3629b7a682061d4c6883c35750878c998c2946f99fc70e e853025a32604033563ba0534f00dfaa3a7b7ab8a58ba1ff273f5171b8b0b467 72afdeb47d0f75352b8986ec6b7c7a8a4527a72fc245f7469a6f12df141a2ec4
1058500 86d1e3325a942cdad7e74813a1d548d16aa30477ade1436b839e5d8787886226 2c6260122193c565daafbadd28503bd5ed077ee4113f877b1625a3b6b9d86c37 b18663868cb27f76a39e3a91958c7c935cb4a8bb3146bff5b077c733f96a5780
1059000 6fbef62faa5f95b74e45eca92924aa2a1e156ba4761cbf0faf84ff5c55b585e7 7edf5298bc57370fe60d8d319d2e5d97a1d126643977823d601266da268a8935 cf0917a434d3d21f0220e2d57e912a534d10092260015e7d23a6265029134e5d
1059500 d2c7aecc7fc0bef185b164a6491d39525e61a7b36eec25184954116e0c98ab99 af7a5135bef5943c1aad9b8ef09e192a0230a8c4c6c1ae8fe4421aa5e5df0499 a2b06bb577630f4da626f630c564ac204b5715d128c1f6184d2dba2701b623c2
1060000 45ab1dd2a8e66e19733811b7439737685770d6dee337e3161b6d7175254e8673 4965c6b0942bc3ef57f11b6f2e0e0bc8552e4c2e2146b645ff7524aee7ff7f83 a321dd68f9f4832159b7865b31e56b694c7dd29b17bf34854ef2221f752bc613
1060500 c5761a40449ba6a74e1a5129ae07924b51b8898ff1eeaf9db8da2aee647d0612 7fe668aaef8d9836bed662b34b8f7d0b4c6abb9909cd0f722e205601dbc3e405 5855421e292165c955804224dedcd01f53fb528de99ab1a07047abb368618d7b
1061000 e297b28ed73b1a92602b1f2eeb5b440754345478353c815489e4136b343f6241 9506b5c030c839fc12e0f6806232bc7abdc76cf5e9945e232246342db52847fc 378600fbf9567f87c18d0467dc47dc8ce24571ece51eee6b5d839420fb2f695a
1061500 228ba4157527381a8bc94e12da1976385e9edfc9777445a702b90bab7a28050a 93fbe2b3a2689a91ef35e326b757903b0a82e3cfea2577d06dcaeb8735b32c39 0af1d2b58d0291856eca9a5620d87ca3f062e4dfcbd9d2a2d873f27c4f14c13e
1062000 706d3ce4695a317869634ffcfc35ad654b2efd84f844057e402ee7941848201d 6b47b1ab8102e8c326cb26c20e36eea5f995f3251aed35eda638ed4b0c5c19f5 7c947a2202e56c27a5a1d84e14caccaa04e3d3ad4348338d3a00556d895bd946
1062500 c3fcf4e0f04dfddee32165ed3126c9a6a91504ee311d6c10bd10f14d6fdc47c7 0279a0d50d4841649f97562751ea348f03242056f4deb13fdb4f9f8ef2801b95 394e7dc6b68233af02094e087ea557aa5c7cfcb9c68e001359bea783484c7a71
1063000 a0c1ccd1f4d73ad8d77e2de61032f30e86a3a8de6718a28dfc1863b617f39358 64fcd7f5a5c131fd3b6b36cc6bdd2a55d79e6ef9a800d46c00834f8b754ff688 3480ce4516b3ca0cf73848fc929d2b0a2e07570c0679a8845eec8d4ca1982587
1063500 2330e271b8eaafc1658c9c51dfd6b495f68551a65b96619cec0307289834d85c 86b93f157059c9597dbd98a08f8a62b53e5be73f4d0061fed3fa547b508a0643 7ce41095c1b455a6d3f74d2f75f1b4e6573de79ed67758bafec649a6bd1d0531
1064000 fdd490d245abdc95953098dab5ec68ceaeb41108f5b622f2a6e0c64565c3f1db 88bb5a1b5754de10c0ef37f329f91d444628e60cf45c79078504a405af8a0ddc 9dbe60c9362c8eaedf48c075b83a2987df3e7618680dc7f05aeb3fa406239355
1064500 9273b1a6243f98cc99a790fc73ebcaaa46c12ebc73baf39d18fd037430e44600 662cb00f6441b43c4e6a03fd0d1efa5e77f8d821b944a4b35605d111651f940f f9e42af8cf6d67cc2befc29bbeac8ba24e0e65538e5b75feecb6093abc36ac67
1065000 0d5ce5340d7ed40fbf374b9315977e6c6f4a472bec71d708a0aa1120e37ee262 f725da7aed8c1b71b586e0dcd03c08512fcb6010425cadffa259e83a01a5e9eb 383bac98458d28ba49fc1cd8cee20f3f5fa4d1a0edafb65c2012141006d8bc67
1065500 05382e2643516f8d9e479666209f071ee9553c77ff42e1cde7065014af248ba9 92b27fc524cf24d169800cc1a65a445a09a813aa2bd2b0b0fd30f594ff1d147f 361e131b2011b987a2d878b76da34429cf4012911de3e4409717610c65210fe9
1066000 2f918d5a92e7f96847cb7efdadbf96663ebcdbf3900ce837f35be2fd5a9bf3f3 2e1d0b02fb03d9b852725dadac2d1a6a5a706d4c57aef1af07475a1d895858b4 e92e7725b210930410a6990d6a4169e15f7283c3b90231498b342e330eadbcb3
1066500 c01960d7eba3c4116ccfcfd56e71a8772f48b6dd44b1e3443b81976267e82c86 1621f414c5a57845322ae46a288a3b30bab756aa0e4ab80fb9c781a5d676e29d 98031c71f74e104385ff155b9fb02d4870a2ee5cd2f2669023f32cda7f53fd9a
1067000 28c2c19ee01f452eca69cb5e65f005b32bf80eb83faa7ce7c0e127738b74a802 16e252a29879548f52ecfcb71a2313136d5d937f79b100850325c7bb71814254 f7874698a0a8d98e3c59d4a872d4a40a9e37ce2a2fc44898e75b6b17540fb490
1067500 692144c9c45467b66ccd780438153ef077a79dd48a58fc3715023b1f76236abe 75acf1e86e7a85c042d72c6167da99efdde8d137b59542220891171bf1318ba8 59f3b75e9af5cd4a728cd137c3466f90d8145af4a7748e3c40017bde52d2aeb1
1068000 a5df3d842f3898395622bcee46f08dab2f76c2456c0e09ba25dd29f46e140c18 6875b9ab0e23047bec2cf3f1a2103f5f6bd143031fb18efa2cdd5c8da187393d 25a6556bf508526d411a5c9d1620113dda46a967e53383d9872e35b658aa546c
1068500 a48cfe7daae6a39e0022c457cdd41a79c2dd56edee7b10204cacd0c03840870b 709bfd3628d5738d27b7d505772dee2aeb55f816c4a9738d3b52251720e72ef5 90c0696efa53e585a3e8c211a7c6aff44711e986b790d86c678c0f74f6df3fec
1069000 8a58edbb5fc50b3c8c028ad46f8cde21dff8ac59b4862c23659dac18100eeb6e 3d480158595f9e106ab5c6f5a02d6dae551dfa3a8c1b015461ec61f9652318c9 e57be6967d1f0ed4233de06f706ef4db292077a8bcb424c220cee997c972270d
1069500 1c2047a1a3315ef6e285656e79be2d74599448d84b1aa15132051f8d2fbe9c5c e1232e9e501512b3241fae5eae73017481534a82d8cb12593db3dd5aec16da12 81a83b4f14907692f70b637f043a19916ade4c7fef1d2b3230956281bbe12407
1070000 b2c9ef97982d02946b78800c9dfafca9b3aae244e78aabd17790855d97eafdc4 0bee49ebf1bddebfed4b7891f616d8ed7e9f94f1a0ada35f068152fb3e715e74 6d610254493a870bc925369c82e431a894e0965d0b7e8837ffed73f900906f70
1070500 05d6e0df5eaf44379f74a59b82cf48593f554aabdc8ff1c8e7b9e29c0120e3f3 bdfd3c96915dac1ad524b75e5504827d27603780d0ce36740f0a7ac99d65269d 0a1e76f48f334f488865b68040f5806662fe1a8b97f984a0b3febce7429b8ffb
1071000 4843769a45f8e41c5addea413a9d60b3b23cad4470c645e154381dd8a052ba16 584b8d85b79c7bc04c451b77200b1f5a43ac1ac675f19df8683fc1d517fe344b 465ac9dfbcfa23e16bfa7def9c4ba8dbad6323c07c0e5bed6f5cf745a710e2ff
1071500 a054cfb37aa34581d4f0af31e90242d2d2573ebf4f2528ddb45a108d85d30654 121b54b328edcc01f19cbc89b4f3e9cd5def9f5cbd2f4af192e99e60785eec78 94289e5393a34623406aa76d1abd7f360e197dd2e47114f17009c335681500cb
1072000 c5ab550bb8c7ebda7617718ba4bc5a91ae505dc653d176ace9aee3ed3b7f621b ae1ad45f79f982b5565bee10fdda973d820f6c315b0336491daef73d08b58bc1 489ae2288e0c7a43c63c8ea05496864edc3c6c0215ef402f1c90f44111e90dd8
1072500 e3ee28857f0079047b39c8e5b5ad5e73d500dc14ec31dcfd96376a781849eb43 3c2b1e6690dea914e5dd9d7dce63a31fd1c2ce13a024fd7cd12b3e253ea41d05 a6d2a1cbcb0f6682ebc431b44dc136e188534972d471c47cb162302dbcf08342
1073000 e4b3f78f6a5a5920108980e51beb7bf63c7fc53ee4e775dcbfaafeec8baaecd1 9a780fd47db384f0383a248bc13aa05c8a4151acde039dec571a4f855261dfde 8e07358f76aa7b0cc75ebf6f316e62bd7dc42a34ba2a83f4097ba92cac23a6b6
1073500 82b8cd32ad30ca55c5a9f817dc7cc8e4973c900cd1860abe9950fc97c907be37 5285894affcf8d17d63784deebcde89272601d347e386f933ecea357004e28ad e93bb24b4f7e093aafc9e5155875ce05ec410beaaaaa79e6731dd6070e015bf8
1074000 9d64baf4c05e3ddea2b624b0c6e78f23064069c994a7af29b30214fe07e9435e 85f0cc4cbfd0a8c625ceabc0c09361a6dad5cfd12942a6ad8cbdefe67b562b60 fa9751e72968610ef51056a04e8467f0de3d53738ee53de9d04f649636313f0f
1074500 e7edd11b9db357df9e63378dc7ce5125b004787fbd2dcc48e056c90b36d3fb58 611419cc6f2ccdc1557de599d1969298d6523edf6e486c913eedf8fee7f20e51 7c40e42807f2105edf27806ae4bd6053b49d176449d24be5848afd2b5d79da11
1075000 a670ddfd0da7ded58fae374fae1794bf524b7fdc0885227ceaf9af9081e49733 62d34c01429af38f299e33c02ef9105c36b35d802cd6fcbcffadd48c562dc099 906084d3e66d7860153f9573c36e4bd86c73b415208129ac889a73b871e34be1
1075500 2a728c2b869c6736e65263cba12507ac08d6b79036584d9c7a2c7d603539e7f2 50b4d0639716fb549d4c480f3c16d05cfbeffd048c6dd7a0743a213379996be6 c6b1f37b4c1436ab3f6741d39ac1345c478b1a5e07f6316032ea4260879c4aeb
1076000 cb1214126b0bd68c93c55b527dfed9ede59de69805a027857a0e05be00124e62 33bc95391e41f7a3932d551df636e00a18b2e0d629ce0b0dc5b4ca9ccc3e9e3d 194ac3bbd52aecd7e8026c704b481acf283abc7eb6744a28fbe5264c911b6681
1076500 119025bb4b9a57e4b0e4b7ba09653a531266b343307a5af0bad57bb23564dfa1 ff905ee2e1df4242ff853cabf0b189655d31bf47ff92d59f68325399ffa27859 e0f12d9cda9239fb7ad33e0126e19752cbc461096c8a89ab8609cc2b74d5d56f
1077000 555eb72f81aee04384cfce568eacd6eeddcb81a68e10f2f1626994d7087f1d3f a2db17ec89ea79c806a67e5a28a75ab1bca017ede8114fba789ec241aa2a6539 58fce8e993527826fe22ff6646349b98539f84d8a3f265f0eb6251fc88e4ab37
1077500 b3f4dc81c85325ac81eb531d90b6cf16d7e2b75f5f305b95865642b8c1fa1bd5 e901d71fb07f0742f446af43a1224585786c2fa127cb36fc21f20ce204cb3dab 7ee5c6c519439b93cc020a5796151c243647e1cdfc5287841c816e533a6896ba
1078000 e6deaf52d4f8f8f266a00deda4f1279dbc9277b1a606fe9b2289105397ecebc4 861db344c44d180ccdc6796b3806d286cc8727c6979eb56f2c4f247f9d946b86 31266e9df5dc02fda025e579e9aea8df2391c156be5679e1bcabce5e55ec79c4
1078500 9f2d0cdba1d04e199eeda34745ad90746ef7311d77f742872e063bcd3eaed840 d01de4885f8db9ebc727dca5271fd08c6e94bde5d870cb990fb669900717e628 6b79f91c0360359260172b317fbfea0b740f5e4e4a74c802156c36bf7ceab627
1079000 ee4309327cd6a09377c1d7191937e534175acaa0c58e45214d447fc211afd7db 453c958e5aa1885090885b796333a33a604139c543af74743ee1c02e1e04336e 2ae246868edfaa771b6cb0adabf985990052f2a83ab1884a696ea787be1d134b
1079500 9bac2ac5d7f12eb3053d9d7bd6f4c38341ebda83efc459d3c2e9920c2a5bd043 b5dee71d79dda8da94546572fb87fcc343fb12ff814c2caeb4b13251372fb748 18aa74065ac38a1b9a33cfe4222b712562a679eca94f034d30ae519cd78c6070
1080000 ca8e6b3cd314c5105c309a544b94f5fedaaa60c6b46808f9fa0c22941289d964 adb321e1035a0cfe67cd1a768815d957f685ab691f8bdcef8067a3fa29ea86aa ab441886532f77bb3a48265fb7a4818021cebba090470449e4a594d60c9427fc
1080500 33b9af6f0bf1102108a3bf71c44f4fa582cfad503643fb07746f787ec62820df 9b05cb5fc9b583ad6158a61ad62f639b6da0d66bc14956eb1280fcd9a3b5dcba 413bf906013a89261db0b1bcf1b69e747f7e8e132da667d6d89e3e900529ccc2
1081000 d5da79499abf179c0056408eccb675189282708c440b577fc538b9f5de65714c 727ace05823f44837d22a80ee33ab955ab6fe7f26bdd0c2b13d78e3bb113821d 1cf655be595d6bde83a254eb82fbb5eb8d07388ff1e67c2eda7ccda1a38f3779
1081500 bf215331b8e106c752e71dfede00fe8c205be5a2a1188b7508545dbd22bfc2c3 afb288c1f80857918e77cbb5b0cf65586195aede8979a8c45811035294ef60f7 7546df9a854250a75216e3fa912eb6be62e2b6316d9a9772006c0e3201f5fc29
1082000 f78a537107770c21247246007ce08a45e7dcbaa551b9f12a4cc9079b78b64045 88decd3918e4e6d5ce1915868f881049380dd9d855001ebf28664d8f4fe279d8 6d638afd79ef31d972eef1ae1a3afc7ef155a4bbda0f59727213edd0c68d5112
1082500 84ae75ba3565ac37619c50e444bfc6fd544d6e585e433c1599a3865851967a75 709236907668df31fe07167937dfb81ebfaf44e50015f6e95e071198db66258f 7f32390a047350b63d0bf90820e84852f21bed9f887bf62f71b199565c045ec3
1083000 c4fc7daba93811ac701a8042c15c8b64bd0e0695b085725cce4f8ad1c4646a50 8592b9641c2c78e11a0d94667c0ab1f4894ceefdc061c7c6ea9031da0254f422 0c2861c131427bae71cc47dd83821d5ef9a92344c0e40c06c7a17a0713ba0bdd
1083500 0fc14672e22643a8475457e39fa6273f33e8fbfdce9b5b22b350cad9b72b3b9d 51c2c14ded65e5f023466d3b4ae4a374472576f60cf42baba6b0d679921da088 3e254c64a4a4b287645cf2bc6e4ac87d35e2c40dc5de078b35a7e356f6d519f6
1084000 fb57fa6354268471642b38417a993ab3c3fe495aa009f09b04285d023c3db9be 3db1a48975fe6b178f5436173dc44668bad3b413797c0df6d1365cf04b9239e1 9b4a23a29151f17df279396195029c0f94113a87c2923a2a7546ab627f3ebe5e
1084500 ac08c1808452ce0919a2813f507f09277f8aa3cd68b92e35e07130d68e78d6eb a23ff63e907d969af55f6096cb8b1635db6adf7aea9669c0d54bba686dfa9da5 fa187cdd47558624e1d8e7fdd9236bc2acbc26da1fed791d9f498d8699c4b664
1085000 1abe79c82ac99781d44e236aba1c6da64cd2382ac3a1e42c5a629fb8d1e64dc4 67e01558800c021a4161537ffeafa2e81d74312b4ca25b6e3d4949bceaf14e6f 34cf0270da07e5323cb595d5412ab8b5584a2908bc754b92da6215f5e0bdafcc
1085500 5e308a1c6ac06aa0b635006f3e0dc89e048d8bd61d01ec97119e1adab66962f6 86ef3554333cfcdafa174d6854f606a9b4d0bef13156334e945ffbbc6718e5ff e03b94c7244413e4dd45447bf3226bf49e10d6f6032a237d764537890eab3920
1086000 e1dbb1b308af5bf26d05c6347326d261d4f85e56ee9a801506645ad3261a7e95 c157e047c28284048c0b2a8a02e8625895a1b6fb4dc7e3141935e49b9a3179d2 8a58897e966b46981a64466f050eb149f28aaa80c671340e81bd41fae9d55c2a
1086500 693b5d2436bb03ddbf301330b6013a0906a96dcb44232a1d8eaed495b50b3baa e290955c58b9b0cde36bfa0697baa3ac1b6f91920ca24f819343fc23a7a6a29b 2b8aec5ed80229f613e86a223eac110cde1e2b5065a0e0ffc305c5b5381d0b1e
1087000 06f21d473d8e5184cabab67cfd0ae5e43067bc4e0bfdb10afbd01ec633692e84 5d375954e98c188ef10a11224e17e8ef39bbd7cf71baaeff5cd98ab151850b97 4eccc4003110d4618cf843d3e3c430a5a3f67862e12cc7c43c2c4ea30c858235
1087500 52937bb1263169c9fb90bcbc164b0712a0d975211186deb2ee478a1acd6c9b9d 3c3811319f2a663e8561ea4a27336215b1215fa638bc167bef784f8d23aedb85 501c1d273073d115ad93e6bec524d198ec54e82e05b7fca1384b6682059af275
1088000 48b02487c9a7ffbd22ed2f43cd8acb8be175798d27cf167119742611513f5a79 7f45d21b188dda1bf12e084f1cd52ab4b9fbefc8c3fc9a269e8c5d923aca3c70 e4d9c64af66e25fba4cee8b74e36e824be4165d3067319b8056c7da215c77316
1088500 099b96d7bdea5e8ee60f5f80e876f0d41814b067511d7a09c908097a1191f61e 1afe7a92dab5934e92344079bcdc92457096786734b64e8fc61a76e68dddc3b2 eeea636691ec6840b11f22e2e0108d570f937115a2968a421832f7fc3a91c1ab
1089000 71b75133d9c405fceffd1445d1d1c2b5f7bdf1e9ea772c4fe9c7ad1745b18dc4 4d8160f9d99563c94824a4396576844661f8eabd4a0248659112fb4a8b14d9f4 35d6379981d3604c174e37c1390238b0d765ce7cfd4a5cdc2e4d690b263a4229
1089500 73b592869e9121d39bbc74022204290faf811c37dd7b1f377b31042636e3b1ba 58005bde06a6f8a0d72b84e8a2b4ddc227ef9060d5293f7895abcfa545035e48 7087e0bf7e8063fadcfa43610ffd6afd79a16eaa6d002400eb4aa828c2cc5a57
1090000 31ef8e17324e817ee4784d9c4812012521d6179d612756d4b14a16eecd40a293 c2d728f7215a43d95c5185ed221d0273b5dc99fbd9d6f7f243e14bab876f2230 13172dd44d381e32e368138d44f42b215fdd4673b09260c9d8551b520ae1e65c
1090500 686b2caf7f33fcf3f019b5746d9a146c10fedb7e8f672615e0b6e6ce5113d5a4 47f370504009b9c383251cf39a7f0a87b7630c0e8bd9fac80bb6019137a96286 e4fb436b5acccb15018d9f7dc8f18834c76463b0bc566f1f7d410bb69a74156a
1091000 c6892f956bf40f0e9503dc0f249ff860f8d030a2dbef90b04c0c9a2b5883df84 98d2585ddee95b72e40f9bd1ba0d5330625231b8c31c25bff9b57ee508c23215 6c3c5a22398e694febfa38d5df32585e3835b18b23d79f7bd69a8815e4164c92
1091500 6ee9b389ea350889ca2ad7b760addcebb3669fe449bbfd45d331f2bfe1fd91e3 596c3088087f434c7e56f7f1a864a0f2cceac34a21139f5c0b9224835245ccd5 e646be1688828df6a5a37fcab547e74b4f054c442b9bc437eccbef69952284a5
1092000 ae131361b7cf2eab6bf3949bafcb0135c9be361b80b059e91037f6e695eaa655 d7eb8ddf3cb2711d8649be5fa0e1f6b35397fe783949070c1cc71fd97df54be9 1e053b228604a3cc97764a4ef6c7a229ece936640385b4e162142f999ff2cae9
1092500 655d30044d9437dc51444aeb1c8796c237fa730d4ee1b92ec6cc76def475017a bc43c30f84657322b6dac014b80856f457020e1df7c275abf07c8b5f21117cce 4c8235ff2555249fe401f4c7cf93b33951da23697dfe8c4c87590e8c44bb8d95
1093000 27d7d2d1f9abffa9b22029ca4b1475468194cfcdbb7006f4e585fd91e984c859 c8fb498fced5cf205903df41860a511801abaa2cb879dd98816c02b85fc2c974 56e05a9fd09d5ce5b4a0f58edeb13fc561b8251faf67192cd6f1c3666df88632
1093500 70999f0d29e11b28c6fa32fca38cd31e05e1a472dfeb6fccebece8814d0efc02 d40511f86e8b9e54f25e7e514d1168042405d14a4b8875ed922c4bbcc050f59a 57a86e678a5ba87c619c922512b2ccc984767e5406e4ff3a35f7107b4957076a
1094000 99d91b7e696a6b0b215b4f8f0147b8d3b52fcf42065e61113a1a2eb13c52dd97 9a37f85b8140076a138af87244a768cfc4c045cb3993786819e24585a922d796 ada1c5ecf8b4457fcdd380626de3bdd48d8c95af717562f61b434ee2577d9a38
1094500 5dded8e857a5c9bc83b4398474a7937145024e3230d339702661cfcf05361d42 58a589c26bedcf941981bc4b433ded102f40fc2668ceb2e81d00288e5beba6a9 996b065a617762b72be39f01d784d921fc02829bf970bf34a2a6d19f23eab87a
1095000 a5a48d0965f9622d7c3ba991ecd272a834f053b32257e2587e4e9da849dfe3c0 81703ffd7a8f0894456186c979d6f5706586a4d0518e9de2de68c822f086f16c 464290e916c37793e092ef0ee3be8503ac5bd9468001a2fee5effb2071c9ec9d
1095500 a235f6bb20a438fa3d67dfe510c843aab2cad4f49f07adbd1fda0b693aaae9b9 934cbb1cff86d8682c36350b5e83313fad85ec15b087f1a13706d7363f9a3fcb d1c53c1f49f40e8fabb19409ca2330168a5e43d9eedfc8144e3cde9bded0c1af
1096000 63000c3f4bdc50a56e493e39bb309ce54ee258ff574007978441bca92aa69f0c dba99d75f52fd990e0301d1f84a74c9e146826d9ffd0da705000e4c039fa0fe0 14e2035260de3e558e3d0899b399684457ba033768f7655300a4a7fccc790df1
1096500 2373e0b0e90f23f606c59c162d943598a849c29a3e617452de9990790e5fb506 81320530cd616af57f1670c5de33e7e8f654f2aa2913f7f4297a36ed7a44ff14 90be350d50a32473def133853a18ae8b5332c333071e3dcff07ad07e15e039d7
1097000 dafc272207365b827fb4dd9ed07caeda120548293561e2ec48566d7258b2f9f6 f560a00cbf2f687d025806daeae718aa74b97f6b00414c4abf9a71d73898bd4e c2026463cb5bce549a185e7bc323ff5b8f91fd4a22b064d36752b4839963c3da
1097500 f9a416aaa0aee2e869323282d455d7ea61b9c0183bd12565490e96945ad0336f 92972344a16f716fbf7bf03dbed916042f42a5c0c260a821c70a2d43a328a8b0 346ac0565710bfbb9d3989420a66a61b5deca63e6617d1b69a013dcd048a8122
1098000 4b4df3051200b1b344f956ed69a5ccb98a1cf7000bec0ac946c268e19385adf5 376bd8174073cd92176431177894273de568ba8443858591c7af2af9f78224b6 365233e16a95cc466030a46dbadc0ea92b87e31c70fe6d1c959b4078ec069672
1098500 f18ac1d6454b181f279d1e36c106be1292ffa5f0f30cf3af824366b53ea3755e 1134bf04bb8b18633fabbb35b07682ba4b8780ae8cc505070a1be1483db573f9 dc07084ee0fdba51c2f7425278f761387d95906f4b2f52fac5b9951a0d1c59e1
1099000 8f4364828bf4d9bd4a1bdc8dabfdf7f3535b28c63ab47c3d2cfd8ad8a594be21 8faf1d711d89328c7847dcdaadab2d45608e741b7f40b85716650817240eaedc c2db5228e20dd25cb2d8510cf04fac1dc174ca7981d0e4b8dbfada47a0b52bfe
1099500 da297c6457abceb7248d583bd51bd3c184fa2591b15897d6f2a8ed9f92d95db6 12844b70679f87cce949af3c2cb6cffda2c2a76c3a718daaed46fb2d83baa0ad a80e86275387ed469cfba007538760470cd982624c882e3975275b21960ac9f2
1100000 4e8e78c7a26937f5c671c1554ba789e0acbe8b49f734a4d299e267aec787fc76 6f6ee9ababd774f9abfec595f94ad830aa434e0802577fdfba8732f7216db05f 8c0afe848836cee94e822c1c5b7f7df14e85340f7c2a4922728e856e5e9f11f6
1100500 943f989be35079cd2ee59cc67b44be493e4098f58e304f837360495c96990627 78909b8e2aad94dc3f9d70f84274556a385839d6567684099194dfb68a22ff96 2f1ba2dd07608289b77e02fd19b7006b12db5c3ccb4f4a1a7ad4961a0d9a9b6c
1101000 61a5247a1fa45485eee15a9eb1ab96c2e05d1e3e3cd269b83387e338b26bf702 09771314b9219cd5013b1113e92cd70e628c086be2d6c9242f4f452a60176ebe 3f04bb6a4ffb41e7dccabbfbff14dc5a2e2cdede0038a03c637aa8508cb92897
1101500 18e769995865e33ccca1bcc726049918063b1596c54aff284f85d672c5cd7002

8
iguana/iguana_msg.c

@ -578,6 +578,14 @@ int32_t iguana_msgparser(struct iguana_info *coin,struct iguana_peer *addr,struc
len = recvlen;
if ( (retstr= SuperNET_p2p(coin,addr,&delay,addr->ipaddr,data,recvlen,H->command[strlen("SuperNET")]=='b')) != 0 )
{
cJSON *rawtxjson;
if ( (rawtxjson= cJSON_Parse(retstr)) != 0 )
{
if ( jstr(rawtxjson,"method") != 0 && strcmp(jstr(rawtxjson,"method"),"rawtx_return") == 0 )
{
;
}
}
iguana_send_supernet(coin,addr,retstr,delay);
free(retstr);
}

150
iguana/iguana_payments.c

@ -361,7 +361,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
{
if ( total < (satoshis + txfee) )
{
free_json(txobj), free_json(vins);
free_json(vins);
free(unspents);
printf("insufficient total %.8f vs (%.8f + %.8f)\n",dstr(total),dstr(satoshis),dstr(txfee));
return(0);
@ -369,7 +369,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
if ( (change= (total - (satoshis + txfee))) > 0 && (changeaddr == 0 || changeaddr[0] == 0) )
{
printf("no changeaddr for %.8f\n",dstr(change));
free_json(txobj), free_json(vins);
free_json(vins);
free(unspents);
return(0);
}
@ -378,7 +378,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
{
if ( iguana_addressvalidate(coin,&addrtype,changeaddr) < 0 )
{
free_json(txobj), free_json(vins);
free_json(vins);
free(unspents);
printf("illegal destination address.(%s)\n",changeaddr);
return(0);
@ -389,7 +389,6 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
}
rawtx = bitcoin_json2hex(myinfo,coin,&txid,txobj,0);
}
free_json(txobj);
}
free(unspents);
*vinsp = vins;
@ -407,9 +406,75 @@ void iguana_unspentslock(struct supernet_info *myinfo,struct iguana_info *coin,c
}
}
char *iguana_rawtxissue(struct supernet_info *myinfo,struct iguana_info *coin,cJSON **vinsp,uint32_t locktime,uint64_t satoshis,char *changeaddr,uint64_t txfee,cJSON *addresses,int32_t minconf,char *spendscriptstr)
{
struct rawtx_queue *ptr; struct iguana_peer *addr; uint8_t spendscript[IGUANA_MAXSCRIPTSIZE]; int32_t i,n,spendlen,delay = 0; cJSON *reqjson,*valsobj,*txobj = 0; uint32_t rawtxtag; char *rawtx = 0; double expiration;
*vinsp = 0;
if ( coin->VALIDATENODE != 0 || coin->RELAYNODE != 0 )
{
if ( (txobj= bitcoin_txcreate(coin,locktime)) != 0 )
{
spendlen = (int32_t)strlen(spendscriptstr) >> 1;
decode_hex(spendscript,spendlen,spendscriptstr);
bitcoin_txoutput(coin,txobj,spendscript,spendlen,satoshis);
if ( (rawtx= iguana_calcrawtx(myinfo,coin,vinsp,txobj,satoshis,changeaddr,txfee,addresses,minconf)) != 0 && *vinsp != 0 )
{
free_json(txobj);
return(rawtx);
}
}
}
if ( txobj != 0 )
free_json(txobj);
if ( (n= coin->peers.numranked) > 0 )
{
reqjson = cJSON_CreateObject();
jaddstr(reqjson,"agent","iguana");
jaddstr(reqjson,"method","rawtx");
jaddstr(reqjson,"changeaddr",changeaddr);
jaddstr(reqjson,"spendscriptstr",spendscriptstr);
jadd(reqjson,"addresses",addresses);
OS_randombytes((uint8_t *)&rawtxtag,sizeof(rawtxtag));
jaddnum(reqjson,"rawtxtag",rawtxtag);
valsobj = cJSON_CreateObject();
jaddstr(valsobj,"coin",coin->symbol);
jadd64bits(valsobj,"amount",satoshis);
jadd64bits(valsobj,"txfee",txfee);
jaddnum(valsobj,"minconf",minconf);
jaddnum(valsobj,"locktime",locktime);
jadd(reqjson,"vals",valsobj);
//{\"agent\":\"iguana\",\"method\":\"rawtx\",\"changeaddr\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"addresses\":[\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\"],\"vals\":{\"coin\":\"BTCD\",\"amount\":\"10000000\"},\"spendscriptstr\":\"76a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac\"}
expiration = OS_milliseconds() + 10000;
for (i=0; i<n; i++)
{
if ( (addr= coin->peers.ranked[i]) != 0 && addr->supernet != 0 && addr->usock >= 0 )
iguana_send_supernet(coin,addr,jprint(reqjson,0),delay);
}
while ( OS_milliseconds() < expiration )
{
if ( (ptr= queue_dequeue(&myinfo->rawtxQ,0)) != 0 )
{
if ( rawtxtag == ptr->rawtxtag )
{
rawtx = clonestr(ptr->rawtx);
*vinsp = ptr->vins;
break;
}
else
{
free_json(ptr->vins);
free(ptr);
}
}
}
return(rawtx);
}
return(0);
}
char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,uint64_t satoshis,uint64_t txfee,char *comment,char *comment2,int32_t minconf,char *account)
{
uint8_t addrtype,spendscript[1024],rmd160[20]; int32_t completed; char *rawtx=0,*signedtx = 0; bits256 signedtxid,senttxid; cJSON *retjson,*vins,*addresses,*txobj; uint32_t spendlen,locktime = 0; struct iguana_waddress *waddr;
uint8_t addrtype,spendscript[1024],rmd160[20]; int32_t completed; char spendscriptstr[4096],*rawtx=0,*signedtx = 0; bits256 signedtxid,senttxid; cJSON *retjson,*vins,*addresses; uint32_t spendlen,locktime = 0; struct iguana_waddress *waddr;
//sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful. Y
addresses = iguana_getaddressesbyaccount(myinfo,coin,account);
if ( coin->changeaddr[0] == 0 )
@ -422,51 +487,37 @@ char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *
{
if ( iguana_addressvalidate(coin,&addrtype,coinaddr) < 0 )
return(clonestr("{\"error\":\"invalid coin address\"}"));
//avail = iguana_availunspents(myinfo,&unspents,&num,coin,minconf,account,coin->blockspace,sizeof(coin->blockspace));
//if ( avail < satoshis+txfee || unspents == 0 || num <= 0 )
// return(clonestr("{\"error\":\"not enough funds\"}"));
//else
if ( (txobj= bitcoin_txcreate(coin,locktime)) != 0 )
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr);
spendlen = bitcoin_standardspend(spendscript,0,rmd160);
init_hexbytes_noT(spendscriptstr,spendscript,spendlen);
if ( (rawtx= iguana_rawtxissue(myinfo,coin,&vins,locktime,satoshis,coin->changeaddr,txfee,addresses,minconf,spendscriptstr)) != 0 )
{
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr);
spendlen = bitcoin_standardspend(spendscript,0,rmd160);
bitcoin_txoutput(coin,txobj,spendscript,spendlen,satoshis);
if ( (rawtx= iguana_calcrawtx(myinfo,coin,&vins,txobj,satoshis,coin->changeaddr,txfee,addresses,minconf)) != 0 && vins != 0 )
if ( (signedtx= iguana_signrawtx(myinfo,coin,&signedtxid,&completed,vins,rawtx)) != 0 )
{
if ( (signedtx= iguana_signrawtx(myinfo,coin,&signedtxid,&completed,vins,rawtx)) != 0 )
{
iguana_unspentslock(myinfo,coin,vins);
retjson = cJSON_CreateObject();
jaddbits256(retjson,"result",signedtxid);
jaddstr(retjson,"signedtx",signedtx);
jadd(retjson,"complete",completed != 0 ? jtrue() : jfalse());
if ( 0 )
{
senttxid = iguana_sendrawtransaction(myinfo,coin,signedtx);
if ( bits256_cmp(senttxid,signedtxid) == 0 )
jaddstr(retjson,"sendrawtransaction","success");
else jaddbits256(retjson,"senderror",senttxid);
}
free_json(vins);
free(rawtx);
free(signedtx);
free_json(txobj);
return(jprint(retjson,1));
}
else
iguana_unspentslock(myinfo,coin,vins);
retjson = cJSON_CreateObject();
jaddbits256(retjson,"result",signedtxid);
jaddstr(retjson,"signedtx",signedtx);
jadd(retjson,"complete",completed != 0 ? jtrue() : jfalse());
if ( 0 )
{
free_json(vins);
free(rawtx);
free_json(txobj);
return(clonestr("{\"error\":\"couldnt sign rawtx\"}"));
senttxid = iguana_sendrawtransaction(myinfo,coin,signedtx);
if ( bits256_cmp(senttxid,signedtxid) == 0 )
jaddstr(retjson,"sendrawtransaction","success");
else jaddbits256(retjson,"senderror",senttxid);
}
free_json(vins);
free(rawtx);
free(signedtx);
return(jprint(retjson,1));
}
else
{
free_json(txobj);
return(clonestr("{\"error\":\"couldnt create rawtx\"}"));
free_json(vins);
free(rawtx);
return(clonestr("{\"error\":\"couldnt sign rawtx\"}"));
}
} else return(clonestr("{\"error\":\"couldnt create txobj\"}"));
} else return(clonestr("{\"error\":\"couldnt create rawtx\"}"));
}
return(clonestr("{\"error\":\"need address and amount\"}"));
}
@ -502,18 +553,29 @@ STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses,vals,spendscriptstr)
txfee = coin->txfee;
if ( (rawtx= iguana_createrawtx(myinfo,coin,&vins,locktime,satoshis,spendscriptstr,changeaddr,txfee,minconf,addresses)) != 0 )
{
jaddnum(retjson,"rawtxtag",(uint32_t)juint(json,"rawtxtag"));
jaddstr(retjson,"rawtx",rawtx);
jaddstr(retjson,"agent","iguana");
jaddstr(retjson,"method","rawtx_result");
jadd(retjson,"vins",vins);
free(rawtx);
} else jaddstr(retjson,"error","couldnt create rawtx");
if ( vins != 0 )
free_json(vins);
}
return(jprint(retjson,1));
}
//{"rawtx":"0100000011533957010252b9534fe0186625e3075606f9b547e223830af04b3fb9dab2aaadc7cad5300100000000ffffffff0280969800000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac700c023b000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac00000000","agent":"iguana","method":"rawtx_result","vins":[{"txid":"30d5cac7adaab2dab93f4bf00a8323e247b5f9065607e3256618e04f53b95202","vout":1,"scriptPubKey":"76a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac"}],"tag":"17812456603326673661"}
INT_ARRAY_STRING(iguana,rawtx_result,rawtxtag,vins,rawtx)
{
struct rawtx_queue *ptr = calloc(1,sizeof(*ptr) + strlen(rawtx) + 1);
strcpy(ptr->rawtx,rawtx);
ptr->vins = jduplicate(vins);
ptr->rawtxtag = rawtxtag;
queue_enqueue("rawtxQ",&myinfo->rawtxQ,&ptr->DL,0);
return(0);
}
STRING_AND_INT(bitcoinrpc,sendrawtransaction,rawtx,allowhighfees)
{
cJSON *retjson = cJSON_CreateObject(); bits256 txid;

2
iguana/iguana_realtime.c

@ -258,7 +258,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 )
coin->RThash1 = bp->hashes[1];
bp->lastRT = (uint32_t)time(NULL);
if ( coin->RTheight <= coin->longestchain-offset && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
if ( coin->RTheight <= coin->longestchain-offset && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+60 )
{
iguana_RThdrs(coin,bp,coin->peers.numranked);
coin->RThdrstime = bp->lastRT;

2
iguana/iguana_recv.c

@ -661,7 +661,7 @@ int32_t iguana_bundlehashadd(struct iguana_info *coin,struct iguana_bundle *bp,i
size = sizeof(blockR);
iguana_ramchain_free(coin,&blockR,1);
}
else if ( bp->hdrsi == coin->longestchain/bp->n )
else if ( bp->hdrsi > 0 && bp->hdrsi == coin->longestchain/bp->n )
{
checki = iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,0,block->RO.hash2,zero,1,0);
if ( (fp= fopen(fname,"rb")) != 0 )

119
iguana/iguana_sign.c

@ -681,125 +681,6 @@ int32_t bitcoin_verifyvins(struct iguana_info *coin,bits256 *signedtxidp,char **
return(complete);
}
/*int32_t bitcoin_verifytx(struct iguana_info *coin,bits256 *signedtxidp,char **signedtx,char *rawtxstr,struct vin_info *V,int32_t numinputs)
{
int32_t len,maxsize,retval = -1; uint8_t *serialized,*serialized2;
struct iguana_msgtx msgtx; bits256 txid; char vpnstr[64];
len = (int32_t)strlen(rawtxstr);
maxsize = len + 32768;
serialized = calloc(1,maxsize), serialized2 = calloc(1,maxsize);
len >>= 1;
vpnstr[0] = 0;
decode_hex(serialized,len,rawtxstr);
memset(&msgtx,0,sizeof(msgtx));
if ( iguana_rwmsgtx(coin,0,0,serialized,maxsize,&msgtx,&txid,vpnstr) > 0 && numinputs == msgtx.tx_in )
{
if ( bitcoin_verifyvins(coin,signedtxidp,signedtx,&msgtx,serialized2,maxsize,V,SIGHASH_ALL) == 0 )
retval = 0;
else printf("bitcoin_verifytx: bitcoin_verifyvins error\n");
} else printf("bitcoin_verifytx: error iguana_rwmsgtx\n");
free(serialized), free(serialized2);
return(retval);
}
cJSON *iguana_signtx(struct supernet_info *myinfo,struct iguana_info *coin,bits256 *txidp,char **signedtxp,struct bitcoin_spend *spend,cJSON *txobj,cJSON *vins)
{
int32_t i,j,m,n,plen; char *rawtxstr,*pubkeystr,*spendstr; struct vin_info *V,*vp; bits256 txid; struct iguana_waccount *wacct; struct iguana_waddress *waddr; cJSON *vitem,*vinsobj,*pubkeys;
V = calloc(spend->numinputs,sizeof(*V));
if ( *signedtxp != 0 )
{
if ( txobj != 0 )
free_json(txobj);
txobj = bitcoin_hex2json(coin,&txid,0,*signedtxp);
if ( vins != 0 )
{
if ( jobj(txobj,"vin") != 0 )
jdelete(txobj,"vin");
jadd(txobj,"vin",iguana_createvins(myinfo,coin,txobj,vins));
}
//printf("bitcoin_hex2json (%s)\n",jprint(txobj,0));
free(*signedtxp);
}
vinsobj = jarray(&n,txobj,"vin");
for (i=0; i<spend->numinputs; i++) // N times less efficient, but for small number of inputs ok
{
vp = &V[i];
if ( i < n )
{
if ( (vitem= jitem(vinsobj,i)) != 0 && ((spendstr= jstr(vitem,"scriptPub")) != 0 || (spendstr= jstr(vitem,"scriptPubKey")) != 0) )
{
vp->spendlen = (int32_t)strlen(spendstr) >> 1;
decode_hex(vp->spendscript,vp->spendlen,spendstr);
} else spendstr = 0;
}
else vitem = 0;
vp->N = vp->M = 1;
if ( (rawtxstr= bitcoin_json2hex(myinfo,coin,&txid,txobj,0)) != 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( bits256_nonz(spend->inputs[i].privkeys[j]) != 0 )
{
vp->signers[j].privkey = spend->inputs[i].privkeys[j];
bitcoin_pubkey33(coin->ctx,vp->signers[j].pubkey,vp->signers[j].privkey);
}
else
{
vp->signers[j].pubkey[0] = 0;
break;
}
}
if ( vitem != 0 && (pubkeys= jarray(&m,vitem,"pubkeys")) != 0 )//spend->inputs[i].numpubkeys > 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( j < m && (pubkeystr= jstr(jitem(pubkeys,j),0)) != 0 && is_hexstr(pubkeystr,(int32_t)strlen(pubkeystr)) > 0 )
decode_hex(vp->signers[j].pubkey,(int32_t)strlen(pubkeystr)>>1,pubkeystr);
else if ( (plen= bitcoin_pubkeylen(spend->inputs[i].pubkeys[j])) > 0 )
memcpy(vp->signers[j].pubkey,spend->inputs[i].pubkeys[j],plen);
}
}
//if ( spend->inputs[i].spendlen > 0 )
// {
// memcpy(vp->spendscript,spend->inputs[i].spendscript,spend->inputs[i].spendlen);
// vp->spendlen = spend->inputs[i].spendlen;
// }
if ( spend->inputs[i].p2shlen > 0 )
{
memcpy(vp->p2shscript,spend->inputs[i].p2shscript,spend->inputs[i].p2shlen);
vp->p2shlen = spend->inputs[i].p2shlen;
}
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( vp->signers[j].coinaddr[0] == 0 && (plen= bitcoin_pubkeylen(spend->inputs[i].pubkeys[j])) > 0 )
{
bitcoin_address(vp->signers[j].coinaddr,coin->chain->pubtype,spend->inputs[i].pubkeys[j],plen);
}
}
if ( myinfo->expiration != 0 )
{
for (j=0; j<sizeof(spend->inputs[i].privkeys)/sizeof(*spend->inputs[i].privkeys); j++)
{
if ( bits256_nonz(vp->signers[j].privkey) == 0 && vp->signers[j].coinaddr[0] != 0 )
{
if ( (waddr= iguana_waddresssearch(myinfo,coin,&wacct,vp->signers[j].coinaddr)) != 0 )
vp->signers[j].privkey = waddr->privkey;
}
}
}
vp->sequence = spend->inputs[i].sequence;
//printf("json2hex.(%s)\n",rawtxstr);
}
}
bitcoin_verifytx(coin,txidp,signedtxp,rawtxstr,V,spend->numinputs);
//printf("json2hex.(%s)\n",rawtxstr);
free(rawtxstr);
if ( *signedtxp != 0 && i != spend->numinputs )
free(*signedtxp), *signedtxp = 0;
free(V);
return(txobj);
}*/
int32_t iguana_vininfo_create(struct supernet_info *myinfo,struct iguana_info *coin,uint8_t *serialized,int32_t maxsize,struct iguana_msgtx *msgtx,cJSON *vins,int32_t numinputs,struct vin_info *V)
{
int32_t i,plen,len = 0; struct vin_info *vp; struct iguana_waccount *wacct; struct iguana_waddress *waddr; uint32_t sigsize,pubkeysize,p2shsize,suffixlen;

55
iguana/iguana_unspents.c

@ -150,7 +150,8 @@ struct iguana_pkhash *iguana_pkhashfind(struct iguana_info *coin,struct iguana_r
//P = (void *)(long)((long)rdata + rdata->Poffset);
if ( bp == coin->current )
ACCTS = ramchain->A;
else ACCTS = RAMCHAIN_PTR(rdata,Aoffset); //ACCTS = (void *)(long)((long)rdata + rdata->Aoffset);
else ACCTS = RAMCHAIN_PTR(rdata,Aoffset);
//ACCTS = (void *)(long)((long)rdata + rdata->Aoffset);
if ( (pkind= iguana_sparseaddpk(PKbits,rdata->pksparsebits,rdata->numpksparse,rmd160,P,0,ramchain)) > 0 && pkind < numpkinds )
{
*ramchainp = ramchain;
@ -208,7 +209,10 @@ int64_t iguana_pkhashbalance(struct supernet_info *myinfo,struct iguana_info *co
if ( iguana_spentflag(coin,&RTspend,&spentheight,ramchain,hdrsi,unspentind,lastheight,minconf,maxconf,U[unspentind].value) == 0 )
{
if ( *nump < max && unspents != 0 )
unspents[*nump] = ((uint64_t)hdrsi << 32) | unspentind;
{
unspents[*nump << 1] = ((uint64_t)hdrsi << 32) | unspentind;
unspents[(*nump << 1) + 1] = U[unspentind].value;
}
(*nump)++;
if ( array != 0 )
jaddi(array,iguana_unspentjson(myinfo,coin,hdrsi,unspentind,T,&U[unspentind],rmd160,coinaddr,pubkey33));
@ -268,15 +272,15 @@ int32_t iguana_pkhasharray(struct supernet_info *myinfo,struct iguana_info *coin
break;
if ( iguana_pkhashfind(coin,&ramchain,&deposits,&lastunspentind,P != 0 ? &P[n] : &_p,rmd160,i,i) != 0 )
{
m = maxunspents;
m = maxunspents >> 1;
p = (P == 0) ? &_p : &P[n];
if ( (netbalance= iguana_pkhashbalance(myinfo,coin,array,&spent,unspents != 0 ? &unspents[numunspents] : 0,&m,ramchain,p,lastunspentind,rmd160,coinaddr,pubkey33,i,lastheight,minconf,maxconf)) != deposits-spent && lastheight == IGUANA_MAXHEIGHT && minconf == 1 && maxconf > coin->blocks.hwmchain.height )
if ( (netbalance= iguana_pkhashbalance(myinfo,coin,array,&spent,unspents != 0 ? &unspents[numunspents << 1] : 0,&m,ramchain,p,lastunspentind,rmd160,coinaddr,pubkey33,i,lastheight,minconf,maxconf)) != deposits-spent && lastheight == IGUANA_MAXHEIGHT && minconf == 1 && maxconf > coin->blocks.hwmchain.height )
{
printf("pkhash balance mismatch from m.%d check %.8f vs %.8f spent %.8f [%.8f]\n",m,dstr(netbalance),dstr(deposits),dstr(spent),dstr(deposits)-dstr(spent));
}
else
{
//printf("%s pkhash balance.[%d] from m.%d check %.8f vs %.8f spent %.8f [%.8f]\n",coinaddr,i,m,dstr(netbalance),dstr(deposits),dstr(spent),dstr(deposits)-dstr(spent));
printf("%s pkhash balance.[%d] from m.%d check %.8f vs %.8f spent %.8f [%.8f]\n",coinaddr,i,m,dstr(netbalance),dstr(deposits),dstr(spent),dstr(deposits)-dstr(spent));
total += netbalance;
n++;
}
@ -314,7 +318,7 @@ int64_t iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJ
{
bitcoin_address(coinaddr,addrtypes[i],&rmdarray[i * 20],20);
*numunspentsp = 0;
iguana_pkhasharray(myinfo,coin,array,minconf,maxconf,&total,P,coin->bundlescount,&rmdarray[i * 20],coinaddr,&pubkeys[33*i],lastheight,&unspents[numunspents],numunspentsp,maxunspents);
iguana_pkhasharray(myinfo,coin,array,minconf,maxconf,&total,P,coin->bundlescount,&rmdarray[i * 20],coinaddr,&pubkeys[33*i],lastheight,&unspents[numunspents << 1],numunspentsp,maxunspents);
//printf("iguana_unspents: i.%d of %d: %s %.8f numunspents.%d\n",i,numrmds,coinaddr,dstr(total),*numunspentsp);
maxunspents -= *numunspentsp;
numunspents += *numunspentsp;
@ -357,41 +361,9 @@ uint8_t *iguana_rmdarray(struct supernet_info *myinfo,struct iguana_info *coin,i
return(rmdarray);
}
/*int64_t iguana_unspentset(struct supernet_info *myinfo,struct iguana_info *coin)
{
int64_t sum = 0,total; struct iguana_waccount *wacct,*tmp; struct iguana_waddress *waddr,*tmp2; int32_t n,numunspents = 0; cJSON *addresses = cJSON_CreateArray();
HASH_ITER(hh,myinfo->wallet,wacct,tmp)
{
HASH_ITER(hh,wacct->waddr,waddr,tmp2)
{
if ( waddr->addrtype != coin->chain->pubtype || (bits256_nonz(waddr->privkey) == 0 && waddr->scriptlen == 0) )
continue;
jaddstr(array,waddr->coinaddr);
total = 0;
n = 0;
iguana_pkhasharray(myinfo,coin,0,coin->minconfirms,coin->longestchain,&total,0,coin->bundlescount,waddr->rmd160,waddr->coinaddr,waddr->pubkey,coin->blocks.hwmchain.height - coin->minconfirms,(uint64_t *)coin->blockspace,&n,(int32_t)(sizeof(coin->blockspace)/sizeof(*waddr->unspents))-1000);
if ( n > 0 )
{
if ( waddr->unspents == 0 || waddr->maxunspents < n )
{
waddr->unspents = realloc(waddr->unspents,sizeof(*waddr->unspents) * n);
waddr->maxunspents = n;
}
memcpy(waddr->unspents,coin->blockspace,sizeof(*waddr->unspents) * n);
waddr->numunspents = n;
waddr->balance = total;
sum += total;
numunspents += n;
}
}
}
//printf("available %.8f\n",dstr(sum));
return(sum);
}*/
int32_t iguana_unspentslists(struct supernet_info *myinfo,struct iguana_info *coin,int64_t *totalp,int64_t *unspents,int32_t max,int64_t required,int32_t minconf,cJSON *addresses)
{
int64_t remains,total,sum = 0; int32_t i,n,numunspents,numaddrs; uint8_t pubkey[65],rmd160[20]; char *coinaddr;
int64_t remains,total,sum = 0; int32_t i,n,numunspents,numaddrs; uint8_t addrtype,pubkey[65],rmd160[20]; char *coinaddr;
*totalp = 0;
if ( (numaddrs= cJSON_GetArraySize(addresses)) == 0 )
return(0);
@ -403,12 +375,15 @@ int32_t iguana_unspentslists(struct supernet_info *myinfo,struct iguana_info *co
{
total = 0;
n = 0;
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr);
iguana_pkhasharray(myinfo,coin,0,minconf,coin->longestchain,&total,0,coin->bundlescount,rmd160,coinaddr,pubkey,coin->blocks.hwmchain.height - minconf,unspents,&n,max-1000);
if ( n > 0 )
{
sum += total;
unspents += (n << 1);
numunspents += n;
unspents += n;
if ( numunspents > max )
break;
}
}
}

2
iguana/iguana_volatiles.c

@ -88,7 +88,7 @@ struct iguana_utxo iguana_utxofind(struct iguana_info *coin,int16_t spent_hdrsi,
memset(&utxo,0,sizeof(utxo));
if ( (bp= coin->bundles[spent_hdrsi]) == 0 )
return(utxo);
ramchain = &bp->ramchain;
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
val = ((uint64_t)spent_hdrsi << 32) | spent_unspentind;
if ( spent_unspentind > 0 && spent_unspentind < ramchain->H.data->numunspents )
{

2
iguana/tests/decoderawtransaction

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"decoderawtransaction\",\"params\":[\"0100000051e2335701ce4efd9ffbb6031e0a3e1a3cd0443738fdb7fffb3fb001837206f2717fc096210100000000ffffffff0000000000\"]}"
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"decoderawtransaction\",\"params\":[\"0100000011533957010252b9534fe0186625e3075606f9b547e223830af04b3fb9dab2aaadc7cad5300100000000ffffffff0280969800000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac700c023b000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac00000000\"]}"

2
iguana/tests/listreceivedbyaddress

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"listreceivedbyaddress\",\"params\":[]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listreceivedbyaddress\",\"params\":[\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\"]}"

1
includes/iguana_apideclares.h

@ -84,6 +84,7 @@ ZERO_ARGS(bitcoinrpc,getrawchangeaddress);
SS_D_I_S(bitcoinrpc,move,fromaccount,toaccount,amount,minconf,comment);
STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses,vals,spendscriptstr);
INT_ARRAY_STRING(iguana,rawtx_result,tag,vins,rawtx);
STRING_ARG(iguana,initfastfind,activecoin);
STRING_ARG(iguana,peers,activecoin);

Loading…
Cancel
Save