diff --git a/src/komodo-tx.cpp b/src/komodo-tx.cpp index 2408dc076..084d99c80 100644 --- a/src/komodo-tx.cpp +++ b/src/komodo-tx.cpp @@ -48,7 +48,7 @@ using namespace std; #include "komodo_interest.h" CKey NSPV_key; -char NSPV_pubkeystr[67]; +char NSPV_pubkeystr[67],NSPV_wifstr[64]; uint64_t komodo_accrued_interest(int32_t *txheightp,uint32_t *locktimep,uint256 hash,int32_t n,int32_t checkheight,uint64_t checkvalue,int32_t tipheight) { return(0); diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 7a9bb4052..5ede7987b 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -35,7 +35,6 @@ using namespace std; typedef vector valtype; extern uint8_t ASSETCHAINS_TXPOW; -extern CKey NSPV_key; extern char NSPV_wifstr[]; extern int32_t KOMODO_NSPV; uint256 SIG_TXHASH; @@ -55,7 +54,7 @@ bool TransactionSignatureCreator::CreateSig(std::vector& vchSig, } SIG_TXHASH = hash; if ( KOMODO_NSPV != 0 ) - key = NSPV_key; + key = DecodeSecret(wifstr); else if (pprivKey) key = *pprivKey; else if (!keystore || !keystore->GetKey(address, key)) @@ -63,7 +62,7 @@ bool TransactionSignatureCreator::CreateSig(std::vector& vchSig, fprintf(stderr,"keystore.%p error\n",keystore); return false; } - fprintf(stderr,"privkey (%s) for %s\n",NSPV_wifstr,EncodeDestination(NSPV_key.GetPubKey().GetID()).c_str()); + fprintf(stderr,"privkey (%s) for %s\n",NSPV_wifstr,EncodeDestination(key.GetPubKey().GetID()).c_str()); if (scriptCode.IsPayToCryptoCondition()) {