jl777 8 years ago
parent
commit
5b6f5562cb
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 1
      iguana/dpow/dpow_network.c
  3. 6
      iguana/dpow/dpow_tx.c
  4. 1
      iguana/iguana_msg.c
  5. 2
      iguana/iguana_ramchain.c

2
iguana/dpow/dpow_fsm.c

@ -359,7 +359,7 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo
if ( bp->bestk >= 0 && (rand() % 10) == 0 )
dpow_sigsend(myinfo,dp,bp,myind,bp->bestk,bp->bestmask,srchash,DPOW_SIGCHANNEL);
}
if ( (rand() % 10) == 0 )
if ( (rand() % 20) == 0 )
{
if ( bp->isratify != 0 )
{

1
iguana/dpow/dpow_network.c

@ -73,6 +73,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,char *ipaddr)
}
return(retval);
}
"balance" : 1133.99276868,
void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr)
{

6
iguana/dpow/dpow_tx.c

@ -32,7 +32,7 @@ void dpow_bestmask_update(struct supernet_info *myinfo,struct dpow_info *dp,stru
else if ( bp->scores[nn_senderind] < 1 )
bp->scores[nn_senderind] = 1;
else bp->scores[nn_senderind]++;
if ( startscore > -100 && bp->scores[nn_senderind] <= -100 )
if ( startscore > -1000000 && bp->scores[nn_senderind] <= -1000000 )
printf(">>>>>>>>>>>>> nn_senderind.%d %llx MIA, skip this node for now\n",nn_senderind,(long long)(1LL << nn_senderind));
}
}
@ -45,7 +45,7 @@ uint64_t dpow_lastk_mask(struct dpow_block *bp,int8_t *lastkp)
for (j=0; j<bp->numnotaries; j++)
{
k = DPOW_MODIND(bp,j);
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -100 )
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -1000000 )
continue;
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 )
{
@ -80,7 +80,7 @@ uint64_t dpow_maskmin(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp)
for (j=0; j<bp->numnotaries; j++)
{
k = DPOW_MODIND(bp,j);
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -100 )
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -1000000 )
continue;
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 )
{

1
iguana/iguana_msg.c

@ -603,6 +603,7 @@ int32_t iguana_rwjoinsplit(int32_t rwflag,uint8_t *serialized,struct iguana_msgj
int32_t len = 0;
len += iguana_rwnum(rwflag,&serialized[len],sizeof(msg->vpub_old),&msg->vpub_old);
len += iguana_rwnum(rwflag,&serialized[len],sizeof(msg->vpub_new),&msg->vpub_new);
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(msg->anchor),msg->anchor.bytes);
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(msg->nullifiers[0]),msg->nullifiers[0].bytes);
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(msg->nullifiers[1]),msg->nullifiers[1].bytes);

2
iguana/iguana_ramchain.c

@ -324,6 +324,8 @@ uint32_t iguana_ramchain_addunspent20(struct iguana_info *coin,struct iguana_pee
if ( scriptlen > 0 && script != 0 )
{
memset(&V,0,sizeof(V));
if ( scriptlen == 35 && script[scriptlen-1] == 0xac && script[0] == 33 )
memcpy(V.signers[0].pubkey,script+1,33);
V.spendlen = iguana_scriptgen(coin,&V.M,&V.N,V.coinaddr,V.spendscript,asmstr,u->rmd160,type,(const struct vin_info *)&V,vout);
if ( V.spendlen != scriptlen || memcmp(V.spendscript,script,scriptlen) != 0 )
{

Loading…
Cancel
Save