Browse Source

test

olddPoW
jl777 8 years ago
parent
commit
b08a0eada1
  1. 1
      iguana/dpow/dpow_network.c
  2. 8
      iguana/dpow/dpow_rpc.c

1
iguana/dpow/dpow_network.c

@ -393,7 +393,6 @@ void komodo_assetcoins()
sprintf(confstr,"%s.conf",CURRENCIES[i]); sprintf(confstr,"%s.conf",CURRENCIES[i]);
sprintf(path,"%s/.komodo/%s",userhome,CURRENCIES[i]); sprintf(path,"%s/.komodo/%s",userhome,CURRENCIES[i]);
extract_userpass(coin->chain->serverport,coin->chain->userpass,CURRENCIES[i],coin->chain->userhome,path,confstr); extract_userpass(coin->chain->serverport,coin->chain->userpass,CURRENCIES[i],coin->chain->userhome,path,confstr);
printf("userpass.(%s)\n",coin->chain->userpass);
} }
printf("(%s %u) ",CURRENCIES[i],port); printf("(%s %u) ",CURRENCIES[i],port);
} }

8
iguana/dpow/dpow_rpc.c

@ -16,14 +16,14 @@
bits256 dpow_getbestblockhash(struct supernet_info *myinfo,struct iguana_info *coin) bits256 dpow_getbestblockhash(struct supernet_info *myinfo,struct iguana_info *coin)
{ {
char *retstr; bits256 blockhash; char *retstr; bits256 blockhash;
if ( strcmp(coin->symbol,"USD") == 0 ) if ( 0 && strcmp(coin->symbol,"USD") == 0 )
printf("dpow_getbestblockhash %s FULLNODE.%d\n",coin->symbol,coin->FULLNODE); printf("dpow_getbestblockhash %s FULLNODE.%d\n",coin->symbol,coin->FULLNODE);
memset(blockhash.bytes,0,sizeof(blockhash)); memset(blockhash.bytes,0,sizeof(blockhash));
if ( coin->FULLNODE < 0 ) if ( coin->FULLNODE < 0 )
{ {
if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getbestblockhash","")) != 0 ) if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getbestblockhash","")) != 0 )
{ {
if ( strcmp(coin->symbol,"USD") == 0 ) if ( 0 && strcmp(coin->symbol,"USD") == 0 )
printf("%s getbestblockhash.(%s)\n",coin->symbol,retstr); printf("%s getbestblockhash.(%s)\n",coin->symbol,retstr);
if ( is_hexstr(retstr,0) == sizeof(blockhash)*2 ) if ( is_hexstr(retstr,0) == sizeof(blockhash)*2 )
decode_hex(blockhash.bytes,sizeof(blockhash),retstr); decode_hex(blockhash.bytes,sizeof(blockhash),retstr);
@ -48,7 +48,7 @@ cJSON *dpow_getblock(struct supernet_info *myinfo,struct iguana_info *coin,bits2
{ {
sprintf(buf,"\"%s\"",bits256_str(str,blockhash)); sprintf(buf,"\"%s\"",bits256_str(str,blockhash));
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblock",buf); retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblock",buf);
if ( strcmp(coin->symbol,"USD") == 0 ) if ( 0 && strcmp(coin->symbol,"USD") == 0 )
printf("%s getblock.(%s)\n",coin->symbol,retstr); printf("%s getblock.(%s)\n",coin->symbol,retstr);
} }
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 )
@ -239,7 +239,7 @@ int32_t dpow_getchaintip(struct supernet_info *myinfo,bits256 *blockhashp,uint32
{ {
for (i=0; i<n&&i<maxtx; i++) for (i=0; i<n&&i<maxtx; i++)
txs[i] = jbits256i(array,i); txs[i] = jbits256i(array,i);
if ( strcmp(coin->symbol,"USD") == 0 ) if ( 0 && strcmp(coin->symbol,"USD") == 0 )
printf("dpow_getchaintip %s ht.%d time.%u numtx.%d\n",coin->symbol,height,*blocktimep,n); printf("dpow_getchaintip %s ht.%d time.%u numtx.%d\n",coin->symbol,height,*blocktimep,n);
*numtxp = n; *numtxp = n;
} }

Loading…
Cancel
Save