diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index ba09e4ce0..0cc0f43b0 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1061,7 +1061,7 @@ void iguana_unstickhdr(struct iguana_info *coin,struct iguana_bundle *bp,int32_t void iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,uint32_t now) { - int32_t mult = 7,n=0; + int32_t mult = 7,n=0,priority = 1; if ( now > bp->missingstime+10 ) { if ( coin->current != 0 ) @@ -1070,7 +1070,17 @@ void iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,uin mult = 4; else if ( mult > 7 ) mult = 7; - if ( (n= iguana_bundleissuemissing(coin,bp,1,mult)) > 0 ) + if ( coin->bandwidth < .5*coin->maxbandwidth ) + { + mult--; + if ( coin->bandwidth < .25*coin->maxbandwidth ) + mult /= 2; + if ( mult < 1 ) + mult = 1; + if ( coin->bandwidth < 0.1*coin->maxbandwidth ) + priority = 3; + } + if ( (n= iguana_bundleissuemissing(coin,bp,priority,mult)) > 0 ) { //printf("bundle.[%d] n.%d issued.%d lag.%d\n",bp->hdrsi,n,bp->numissued,now-bp->missingstime); bp->numissued += n; diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 89ad8892e..17c5c1758 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -330,8 +330,6 @@ uint32_t iguana_ramchain_addunspent20(struct iguana_info *coin,struct iguana_pee } else { - if ( type == 12 ) - printf("unexpected regen?? type.%d scriptlen.%d\n",u->type,scriptlen); u->scriptpos = 0; u->fileid = 0; } diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index df9b803aa..d240032f1 100755 --- a/iguana/iguana_tx.c +++ b/iguana/iguana_tx.c @@ -93,7 +93,7 @@ int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmst { memset(&V,0,sizeof(V)); scriptlen = iguana_scriptgen(coin,&V.M,&V.N,coinaddr,scriptspace,asmstr,p->rmd160,u->type,(const struct vin_info *)&V,i); - // printf("scriptlen.%d type.%d\n",scriptlen,u->type); + printf("scriptlen.%d type.%d\n",scriptlen,u->type); } } else printf("iguana_voutset unexpected path\n"); vout->pk_scriptlen = scriptlen;