From 03e8a5a185cdbefe99792060958b26336d873338 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 12 May 2017 08:21:23 +0300 Subject: [PATCH] LTCwif to encrypt wallet output --- iguana/iguana_wallet.c | 5 +++++ iguana/kmd_lookup.h | 3 +++ iguana/tests/statstest | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index adf28c5a8..e17538201 100755 --- a/iguana/iguana_wallet.c +++ b/iguana/iguana_wallet.c @@ -1431,6 +1431,11 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); jaddstr(retjson,"KMDwif",wifstr); } + if ( (coin= iguana_coinfind("LTC")) != 0 ) + { + bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); + jaddstr(retjson,"LTCwif",wifstr); + } if ( need_BTC != 0 ) { bitcoin_priv2wif(wifstr,waddr.privkey,128); diff --git a/iguana/kmd_lookup.h b/iguana/kmd_lookup.h index a09c83ee2..b54fd4415 100755 --- a/iguana/kmd_lookup.h +++ b/iguana/kmd_lookup.h @@ -704,6 +704,7 @@ int32_t _kmd_bitcoinscan(struct iguana_info *coin) { ptr->fpos = ftell(coin->kmd_txidfp); fwrite(tx,1,sizeof(*tx) + tx->numvouts*sizeof(*tx->vouts),coin->kmd_txidfp); + fflush(coin->kmd_txidfp); } } else @@ -712,6 +713,7 @@ int32_t _kmd_bitcoinscan(struct iguana_info *coin) { fwrite(&txid,1,sizeof(txid),coin->kmd_spendfp); fwrite(&numvins,1,sizeof(numvins),coin->kmd_spendfp); + fflush(coin->kmd_spendfp); } for (j=0; jkmd_spendfp); fwrite(&spentvout,1,sizeof(spentvout),coin->kmd_spendfp); + fflush(coin->kmd_spendfp); } } } diff --git a/iguana/tests/statstest b/iguana/tests/statstest index 70e63b43a..a91ae778e 100755 --- a/iguana/tests/statstest +++ b/iguana/tests/statstest @@ -1,3 +1,3 @@ #!/bin/bash -curl --url "http://127.0.0.1:7779" --data "{\"method\":\"bitmap\",\"endtimestamp\":0,\"source\":\"KMD\",\"dest\":\"BTC\",\"numdates\":30}" +#curl --url "http://127.0.0.1:7779" --data "{\"method\":\"bitmap\",\"endtimestamp\":0,\"source\":\"KMD\",\"dest\":\"BTC\",\"numdates\":30}" curl --url "http://78.46.193.199:7779" --data "{\"method\":\"bitmap\",\"endtimestamp\":0,\"source\":\"KMD\",\"dest\":\"BTC\",\"numdates\":30}"