Browse Source

test

olddPoW
jl777 8 years ago
parent
commit
8998ff28e5
  1. 68
      deprecated/obsolete.h
  2. 4
      iguana/iguana_notary.c

68
deprecated/obsolete.h

@ -19597,6 +19597,7 @@ len = 0;
}
// compare against elected notary pubkeys as of height
return(0);
}
int32_t komodo_is_notaryblock(CBlockHeader& blockhdr)
@ -19636,3 +19637,70 @@ len = 0;
}
free(retstr);
}
/*int32_t komodo_gateway_depositremove(uint256 txid,uint16_t vout) // assetchain context
{
int32_t iter,i,n=0; queue_t *Q; struct pax_transaction *ptr; struct queueitem *item;
for (iter=0; iter<2; iter++)
{
Q = (iter == 0) ? &DepositsQ : &PendingsQ;
portable_mutex_lock(&Q->mutex);
if ( Q->list != 0 )
{
item = &ptr->DL;
DL_FOREACH(Q->list,item)
{
ptr = (struct pax_transaction *)item;
if ( memcmp(&ptr->txid,&txid,sizeof(txid)) == 0 && ptr->vout == vout )
{
if ( KOMODO_DEPOSIT >= ptr->fiatoshis )
KOMODO_DEPOSIT -= ptr->fiatoshis;
else KOMODO_DEPOSIT = 0;
for (i=0; i<32; i++)
printf("%02x",((uint8_t *)&txid)[i]);
printf(" v%d DELETE %.8f DEPOSIT %s %.8f\n",vout,dstr(ptr->komodoshis),ptr->symbol,dstr(ptr->fiatoshis));
DL_DELETE(Q->list,&ptr->DL);
n++;
free(ptr);
break;
}
}
}
portable_mutex_unlock(&Q->mutex);
}
if ( queue_size(&DepositsQ) == 0 && queue_size(&PendingsQ) == 0 )
KOMODO_DEPOSIT = PENDING_KOMODO_TX = 0;
return(n);
}*/
for (iter=0; iter<2; iter++)
{
Q = (iter == 0) ? &DepositsQ : &PendingsQ;
portable_mutex_lock(&Q->mutex);
ptr = 0;
if ( Q->list != 0 )
{
item = &ptr->DL;
matchflag = 0;
DL_FOREACH(Q->list,item)
{
ptr = (struct pax_transaction *)item;
if ( memcmp(&ptr->txid,&txids[i-1],sizeof(txids[i-1])) == 0 && ptr->vout == vouts[i-1] )
{
if ( ptr->fiatoshis == block.vtx[0].vout[i].nValue )
{
/*for (j=0; j<32; j++)
printf("%02x",((uint8_t *)&ptr->txid)[j]);
printf(" v%d matched %.8f vout.%d ",ptr->vout,dstr(ptr->fiatoshis),i);
hash = block.GetHash();
for (j=0; j<32; j++)
printf("%02x",((uint8_t *)&hash)[j]);
printf(".blockhash\n");*/
matchflag = 1;
} else printf("error finding %.8f vout.%d\n",dstr(ptr->fiatoshis),i);
break;
}
}
}
portable_mutex_unlock(&Q->mutex);
}

4
iguana/iguana_notary.c

@ -69,7 +69,9 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
ptrs = calloc(1,sizeof(void *)*5 + sizeof(struct dpow_checkpoint));
ptrs[0] = (void *)myinfo;
ptrs[1] = (void *)dp;
ptrs[2] = (void *)DPOW_MINSIGS;
if ( strcmp(dp->symbol,"KMD") != 0 )
ptrs[2] = (void *)2;
else ptrs[2] = (void *)DPOW_MINSIGS;
ptrs[3] = (void *)DPOW_DURATION;
ptrs[4] = 0;
memcpy(&ptrs[5],&checkpoint,sizeof(checkpoint));

Loading…
Cancel
Save