Browse Source

Merge pull request #823 from jl777/jl777

Jl777
pass-iguana-arg
jl777 7 years ago
committed by GitHub
parent
commit
07515fbb63
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      iguana/dpow/dpow_network.c
  2. 4
      iguana/exchanges/LP_ordermatch.c
  3. 2
      iguana/exchanges/coins
  4. 12
      iguana/iguana_notary.c
  5. 1
      iguana/m_notary_run

2
iguana/dpow/dpow_network.c

@ -1545,7 +1545,7 @@ void dpow_bestconsensus(struct dpow_info *dp,struct dpow_block *bp)
for (i=0; i<bp->numnotaries; i++) for (i=0; i<bp->numnotaries; i++)
if ( wts[i] == 0 || owts[i] == 0 ) if ( wts[i] == 0 || owts[i] == 0 )
printf("%s.%d:%d ",Notaries_elected[i][0],wts[i],owts[i]); printf("%s.%d:%d ",Notaries_elected[i][0],wts[i],owts[i]);
printf(" <- problem nodes\n"); printf(" <- problem nodes.%s\n",dp->symbol);
} }
} }
bp->recvmask |= recvmask; bp->recvmask |= recvmask;

4
iguana/exchanges/LP_ordermatch.c

@ -770,9 +770,7 @@ char *LP_connectedalice(struct LP_quoteinfo *qp,char *pairstr) // alice
int32_t LP_aliceonly(char *symbol) int32_t LP_aliceonly(char *symbol)
{ {
if ( strcmp(symbol,"GAME") == 0 ) return(0);
return(1);
else return(0);
} }
int32_t LP_validSPV(char *symbol,char *coinaddr,bits256 txid,int32_t vout) int32_t LP_validSPV(char *symbol,char *coinaddr,bits256 txid,int32_t vout)

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

12
iguana/iguana_notary.c

@ -70,7 +70,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
if ( dp->DESTHEIGHT < dp->prevDESTHEIGHT+DPOW_CHECKPOINTFREQ ) if ( dp->DESTHEIGHT < dp->prevDESTHEIGHT+DPOW_CHECKPOINTFREQ )
{ {
suppress = 1; suppress = 1;
fprintf(stderr,"suppress %s -> KMD\n",dp->symbol); //fprintf(stderr,"suppress %s -> KMD\n",dp->symbol);
} }
} }
/*if ( strcmp(dp->dest,"KMD") == 0 )//|| strcmp(dp->dest,"CHAIN") == 0 ) /*if ( strcmp(dp->dest,"KMD") == 0 )//|| strcmp(dp->dest,"CHAIN") == 0 )
@ -232,17 +232,18 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
} else dpow_destupdate(myinfo,dp,height,blockhash,(uint32_t)time(NULL),blocktime); } else dpow_destupdate(myinfo,dp,height,blockhash,(uint32_t)time(NULL),blocktime);
} // else printf("error getchaintip for %s\n",dp->dest); } // else printf("error getchaintip for %s\n",dp->dest);
dp->numsrctx = sizeof(dp->srctx)/sizeof(*dp->srctx); dp->numsrctx = sizeof(dp->srctx)/sizeof(*dp->srctx);
if ( (strcmp(dp->dest,"KMD") == 0 || strcmp(dp->dest,"CHAIN") == 0) && dp->SRCHEIGHT < src->longestchain ) /*if ( (strcmp(dp->dest,"KMD") == 0 || strcmp(dp->dest,"CHAIN") == 0) && dp->SRCHEIGHT < src->longestchain )
{ {
//fprintf(stderr,"[I "); //fprintf(stderr,"[I ");
dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME); dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME);
//fprintf(stderr," %d] ",dp->SRCHEIGHT); //fprintf(stderr," %d] ",dp->SRCHEIGHT);
} }*/
if ( (height= dpow_getchaintip(myinfo,&merkleroot,&blockhash,&blocktime,dp->srctx,&dp->numsrctx,src)) != dp->last.blockhash.height && height >= 0 ) if ( (height= dpow_getchaintip(myinfo,&merkleroot,&blockhash,&blocktime,dp->srctx,&dp->numsrctx,src)) != dp->last.blockhash.height && height > 0 )
{ {
//char str[65]; printf("[%s].%d %s %s height.%d vs last.%d\n",dp->dest,dp->SRCHEIGHT,dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height); char str[65]; printf("[%s].%d %s %s height.%d vs last.%d\n",dp->dest,dp->SRCHEIGHT,dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height);
if ( dp->lastheight == 0 ) if ( dp->lastheight == 0 )
dp->lastheight = height-1; dp->lastheight = height-1;
dp->SRCHEIGHT = height;
if ( height < dp->last.blockhash.height ) if ( height < dp->last.blockhash.height )
{ {
printf("iguana_dPoWupdate src.%s reorg detected %d vs %d approved.%d notarized.%d\n",dp->symbol,height,dp->last.blockhash.height,dp->approved[0].height,dp->notarized[0].height); printf("iguana_dPoWupdate src.%s reorg detected %d vs %d approved.%d notarized.%d\n",dp->symbol,height,dp->last.blockhash.height,dp->approved[0].height,dp->notarized[0].height);
@ -255,6 +256,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
{ {
while ( dp->lastheight <= height ) while ( dp->lastheight <= height )
{ {
printf("dp->lastheight.%d <= height.%d\n",dp->lastheight,height);
blockhash = dpow_getblockhash(myinfo,src,dp->lastheight); blockhash = dpow_getblockhash(myinfo,src,dp->lastheight);
dpow_srcupdate(myinfo,dp,dp->lastheight++,blockhash,(uint32_t)time(NULL),blocktime); dpow_srcupdate(myinfo,dp,dp->lastheight++,blockhash,(uint32_t)time(NULL),blocktime);
} }

1
iguana/m_notary_run

@ -20,6 +20,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"ad
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"82.202.193.98\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"82.202.193.98\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"54.95.68.31\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"54.95.68.31\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"142.54.164.114\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"142.54.164.114\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"45.7.229.33\"}"
#tests/addnotarys_7776 #tests/addnotarys_7776
coins/btc_7776 coins/btc_7776

Loading…
Cancel
Save