This commit is contained in:
jl777
2017-01-22 21:38:28 +02:00
parent 178eeb4566
commit e2843ac1fb
2 changed files with 6 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
for (i=0; i<32; i++)
((uint8_t *)&sig)[i] = opretbuf[coresize+sizeof(uint256)+i];
}
memcpy(keybuf,key,keylen);
if ( (refvaluesize= komodo_kvsearch((uint256 *)&refpubkey,height,&flags,&kvheight,&valuebuf[keylen],key,keylen)) >= 0 )
{
if ( memcmp(&zeroes,&refpubkey,sizeof(refpubkey)) != 0 )

View File

@@ -545,7 +545,12 @@ Value kvupdate(const Array& params, bool fHelp)
}
}
if ( keylen+refvaluesize <= sizeof(keyvalue) )
{
sig = komodo_kvsig(keyvalue,keylen+refvaluesize,privkey);
if ( komodo_kvsigverify(keyvalue,keylen+refvaluesize,refpubkey,sig) < 0 )
printf("VERIFY ERROR\n");
else printf("verified immediately\n");
}
}
for (i=0; i<32; i++)
printf("%02x",((uint8_t *)&sig)[i]);