test
This commit is contained in:
10
src/komodo.h
10
src/komodo.h
@@ -548,16 +548,16 @@ int32_t komodo_block2height(CBlock *block)
|
||||
int32_t i,n,height = 0; uint8_t *ptr = (uint8_t *)block->vtx[0].vin[0].scriptSig.data();
|
||||
if ( block->vtx[0].vin[0].scriptSig.size() > 5 )
|
||||
{
|
||||
for (i=0; i<6; i++)
|
||||
printf("%02x",ptr[i]);
|
||||
//for (i=0; i<6; i++)
|
||||
// printf("%02x",ptr[i]);
|
||||
n = ptr[0];
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
//03bb81000101(bb 187) (81 48001) (00 12288256) <- coinbase.6 ht.12288256
|
||||
height += ((uint32_t)ptr[i+1] << (i*8));
|
||||
printf("(%02x %x %d) ",ptr[i+1],((uint32_t)ptr[i+1] << (i*8)),height);
|
||||
//printf("(%02x %x %d) ",ptr[i+1],((uint32_t)ptr[i+1] << (i*8)),height);
|
||||
}
|
||||
printf(" <- coinbase.%d ht.%d\n",(int32_t)block->vtx[0].vin[0].scriptSig.size(),height);
|
||||
//printf(" <- coinbase.%d ht.%d\n",(int32_t)block->vtx[0].vin[0].scriptSig.size(),height);
|
||||
}
|
||||
return(height);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
|
||||
else
|
||||
{
|
||||
// height -> pubkey33
|
||||
printf("unexpected komodo_index2pubkey33 height.%d need to get pubkey33\n",height);
|
||||
//printf("unexpected komodo_index2pubkey33 height.%d need to get pubkey33\n",height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user