From 29a27378fdd05d36f4b3f0d8fc2f9aa48f22875c Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 22 Jan 2017 13:52:42 +0200 Subject: [PATCH] test --- src/komodo_kv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index b77e2f58a..c63d0c26b 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -116,7 +116,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) { if ( memcmp(&zeroes,&refpubkey,sizeof(refpubkey)) != 0 ) { - if ( pubkey != refpubkey || komodo_kvsigverify(opretbuf+13,coresize-13,refpubkey,sig) < 0 ) + if ( memcmp(&pubkey,&refpubkey,sizeof(pubkey)) != 0 || komodo_kvsigverify(opretbuf+13,coresize-13,refpubkey,sig) < 0 ) { printf("komodo_kvsigverify error [%d]\n",coresize-13); return; @@ -152,7 +152,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) } if ( transferflag != 0 ) { - ptr->pubkey = pubkey; + memcpy(&ptr->pubkey,&pubkey,sizeof(ptr->pubkey)); ptr->height = height; } else if ( newflag != 0 || (ptr->flags & KOMODO_KVPROTECTED) == 0 )