test
This commit is contained in:
@@ -962,7 +962,7 @@ uint256 komodo_kvsig(uint8_t *buf,int32_t len,uint256 _privkey)
|
||||
int32_t i; for (i=0; i<len; i++)
|
||||
printf("%02x",buf[i]);
|
||||
printf(" -> ");
|
||||
for (i=0; i<len; i++)
|
||||
for (i=0; i<32; i++)
|
||||
printf("%02x",((uint8_t *)&sig)[i]);
|
||||
printf(" -> ");
|
||||
for (i=0; i<32; i++)
|
||||
|
||||
@@ -116,7 +116,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
|
||||
{
|
||||
if ( memcmp(&zeroes,&refpubkey,sizeof(refpubkey)) != 0 )
|
||||
{
|
||||
if ( memcmp(&pubkey,&refpubkey,sizeof(pubkey)) != 0 || komodo_kvsigverify(opretbuf+13,coresize-13,refpubkey,sig) < 0 )
|
||||
if ( komodo_kvsigverify(opretbuf+13,coresize-13,refpubkey,sig) < 0 )
|
||||
{
|
||||
printf("komodo_kvsigverify error [%d]\n",coresize-13);
|
||||
return;
|
||||
@@ -162,7 +162,8 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
|
||||
ptr->height = height;
|
||||
ptr->flags = flags;
|
||||
portable_mutex_unlock(&KOMODO_KV_mutex);
|
||||
} else printf("insufficient fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]);
|
||||
} else printf("size mismatch %d vs %d\n",opretlen,coresize);
|
||||
} else printf("insufficient fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]);
|
||||
} else printf("opretlen.%d mismatch keylen.%d valuesize.%d\n",opretlen,keylen,valuesize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user