jl777 8 years ago
parent
commit
ac07ef0316
  1. 2
      iguana/iguana_notary.c
  2. 6
      iguana/iguana_secp.c
  3. 4
      iguana/m_notary

2
iguana/iguana_notary.c

@ -36,7 +36,7 @@ void dpow_fifoupdate(struct supernet_info *myinfo,struct dpow_checkpoint *fifo,s
memset(newfifo,0,sizeof(newfifo));
for (i=DPOW_FIFOSIZE-1; i>0; i--)
{
if ( bits256_nonz(fifo[i-1].blockhash.hash) != 0 && (tip.blockhash.height - fifo[i-1].blockhash.height) != i )
if ( 0 && bits256_nonz(fifo[i-1].blockhash.hash) != 0 && (tip.blockhash.height - fifo[i-1].blockhash.height) != i )
printf("(%d != %d) ",(tip.blockhash.height - fifo[i-1].blockhash.height),i);
if ( (ind= (tip.blockhash.height - fifo[i-1].blockhash.height)) >= 0 && ind < DPOW_FIFOSIZE )
newfifo[ind] = fifo[i-1];

6
iguana/iguana_secp.c

@ -37,7 +37,11 @@ int32_t bitcoin_pubkeylen(const uint8_t *pubkey)
return(33);
else if ( pubkey[0] == 4 )
return(65);
else return(-1);
else
{
printf("illegal pubkey.[%02x] %llx\n",pubkey[0],*(long long *)pubkey);
return(-1);
}
}
bits256 bitcoin_randkey(secp256k1_context *ctx)

4
iguana/m_notary

@ -20,9 +20,11 @@ tests/addnotarys_7776
./kmd_7776
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"$myip\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KMD\",\"pubkey\":\"$pubkey\"}"
sleep 3
sleep 7
./wp_7776
sleep 3
curl --url "http://127.0.0.1:7776" --data "{\"timeout\":60000,\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}"
sleep 60
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}"

Loading…
Cancel
Save