This commit is contained in:
jl777
2016-11-07 18:51:09 -03:00
parent 8a8080c5ae
commit f10b8e2e42

View File

@@ -237,21 +237,30 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
{ {
for (i=1; i<n-1; i++) for (i=1; i<n-1; i++)
{ {
if ( (pax= komodo_paxfind(&space,txids[i-1],vouts[i-1])) != 0 && ((opcode == 'I' && pax->fiatoshis == block.vtx[0].vout[i].nValue) || (opcode == 'X' && pax->komodoshis == block.vtx[0].vout[i].nValue)) ) if ( (pax= komodo_paxfind(&space,txids[i-1],vouts[i-1])) != 0 )
{ {
if ( pax->marked != 0 ) if ( ((opcode == 'I' && pax->fiatoshis == block.vtx[0].vout[i].nValue) || (opcode == 'X' && pax->komodoshis == block.vtx[0].vout[i].nValue)) )
errs++; {
else matched++; if ( pax->marked != 0 )
printf("errs.%d i.%d match %.8f == %.8f\n",errs,i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue)); errs++;
komodo_paxmark(height,&space,txids[i-1],vouts[i-1],height); else matched++;
printf("errs.%d i.%d match %.8f == %.8f\n",errs,i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue));
komodo_paxmark(height,&space,txids[i-1],vouts[i-1],height);
}
else
{
hash = block.GetHash();
for (j=0; j<32; j++)
printf("%02x",((uint8_t *)&hash)[j]);
printf(" ht.%d blockhash couldnt find vout.[%d]\n",height,i);
komodo_paxmark(height,&space,txids[i-1],vouts[i-1],height);
}
} }
else else
{ {
hash = block.GetHash();
for (j=0; j<32; j++) for (j=0; j<32; j++)
printf("%02x",((uint8_t *)&hash)[j]); printf("%02x",((uint8_t *)&txids[i-1])[j]);
printf(" ht.%d blockhash couldnt find vout.[%d]\n",height,i); printf("cant paxfind txid\n");
komodo_paxmark(height,&space,txids[i-1],vouts[i-1],height);
} }
} }
if ( matched != num ) if ( matched != num )