This commit is contained in:
jl777
2017-01-22 14:30:28 +02:00
parent ad2c025a0e
commit 2987e65021

View File

@@ -572,8 +572,8 @@ Value kvupdate(const Array& params, bool fHelp)
static uint256 zeroes;
CWalletTx wtx; Object ret;
uint8_t keyvalue[IGUANA_MAXSCRIPTSIZE],opretbuf[IGUANA_MAXSCRIPTSIZE]; int32_t i,coresize,haveprivkey,duration,opretlen,height; uint16_t keylen,valuesize=0,refvaluesize=0; uint8_t *key,*value=0; uint32_t flags,tmpflags; struct komodo_kv *ptr; uint64_t fee; uint256 privkey,pubkey,refpubkey,sig;
if (fHelp || params.size() < 4 )
throw runtime_error("kvupdate key value flags passphrase");
if (fHelp || params.size() < 3 )
throw runtime_error("kvupdate key value flags/passphrase");
if (!EnsureWalletIsAvailable(fHelp))
return 0;
haveprivkey = 0;
@@ -587,10 +587,10 @@ Value kvupdate(const Array& params, bool fHelp)
} else flags = 0;
//if ( params.size() >= 4 )
{
privkey = komodo_kvprivkey(&pubkey,(char *)params[3].get_str().c_str());
privkey = komodo_kvprivkey(&pubkey,(char *)params[2].get_str().c_str());
haveprivkey = 1;
flags |= 1;
printf("have privkey derived from (%s)\n",(char *)params[3].get_str().c_str());
printf("have privkey derived from (%s)\n",(char *)params[2].get_str().c_str());
//printf("flags.%d (%s)\n",flags,params[2].get_str().c_str());
}
LOCK2(cs_main, pwalletMain->cs_wallet);