jl777 8 years ago
parent
commit
6545468e2c
  1. 5
      iguana/iguana_rpc.c
  2. 4
      iguana/iguana_wallet.c

5
iguana/iguana_rpc.c

@ -415,7 +415,7 @@ static char *walletpassphrase(RPCARGS)
static char *walletpassphrasechange(RPCARGS)
{
return(sglue4(0,CALLGLUE,"bitcoinrpc","walletpassphrasechange","oldpassphrase",params[0],"newpassphrase",params[1],"oldpermanentfile",params[2],"oldpermanentfile",params[3]));
return(sglue4(0,CALLGLUE,"bitcoinrpc","walletpassphrasechange","oldpassphrase",params[0],"newpassphrase",params[1],"oldpermanentfile",params[2],"oldpermanentfile",params[3]));
}
static char *walletlock(RPCARGS)
@ -1038,7 +1038,8 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
}
free_json(origargjson);
retstr = jprint(retarray,1);
} else retstr = SuperNET_JSON(myinfo,argjson,remoteaddr,port);
}
else retstr = SuperNET_JSON(myinfo,argjson,remoteaddr,port);
return(retstr);
}
*jsonflagp = 1;

4
iguana/iguana_wallet.c

@ -1179,6 +1179,7 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile)
strcpy(myinfo->permanentfile,permanentfile);
retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,myinfo->secret,myinfo->permanentfile,myinfo->password);
//iguana_walletlock(myinfo);
myinfo->dirty = (uint32_t)time(NULL);
return(retstr);
}
@ -1202,6 +1203,7 @@ FOUR_STRINGS(bitcoinrpc,walletpassphrasechange,oldpassword,newpassword,oldperman
_SuperNET_encryptjson(myinfo,destfname,passphrase,0,newpermanentfile,0,loginjson);
//iguana_walletlock(myinfo);
retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,newpassword,newpermanentfile,newpassword);
myinfo->dirty = (uint32_t)time(NULL);
}
free_json(loginjson);
}
@ -1213,7 +1215,7 @@ FOUR_STRINGS(bitcoinrpc,walletpassphrasechange,oldpassword,newpassword,oldperman
scrubfree(tmpstr);
}
if ( retstr == 0 )
retstr = clonestr("{\"error\":\"error changing walletpassphrase\"}");
retstr = clonestr("{\"error\":\"need to call walletpassphrasechange again\"}");
return(retstr);
}

Loading…
Cancel
Save