aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/release-notes.md21
-rw-r--r--src/rpcdump.cpp6
-rw-r--r--src/rpcwallet.cpp5
3 files changed, 28 insertions, 4 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 40bb26e28..8bf0b50bc 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -59,6 +59,27 @@ functioning both as a server and as a RPC client. The RPC client functionality
executable, 'bitcoin-cli'. The RPC client code will eventually be removed from
bitcoind, but will be kept for backwards compatibility for a release or two.
+`walletpassphrase` RPC
+-----------------------
+
+The behavior of the `walletpassphrase` RPC when the wallet is already unlocked
+has changed between 0.8 and 0.9.
+
+The 0.8 behavior of `walletpassphrase` is to fail when the wallet is already unlocked:
+
+ > walletpassphrase 1000
+ walletunlocktime = now + 1000
+ > walletpassphrase 10
+ Error: Wallet is already unlocked (old unlock time stays)
+
+The new behavior of `walletpassphrase` is to set a new unlock time overriding
+the old one:
+
+ > walletpassphrase 1000
+ walletunlocktime = now + 1000
+ > walletpassphrase 10
+ walletunlocktime = now + 10 (overriding the old unlock time)
+
0.9.0rc1 Release notes
=======================
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index a912ea767..9e1d47846 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -23,13 +23,13 @@ using namespace std;
void EnsureWalletIsUnlocked();
std::string static EncodeDumpTime(int64_t nTime) {
- return DateTimeStrFormat("%Y-%m-%"PRId64"T%H:%M:%SZ", nTime);
+ return DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", nTime);
}
int64_t static DecodeDumpTime(const std::string &str) {
- static boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ");
static const boost::posix_time::ptime epoch = boost::posix_time::from_time_t(0);
- const std::locale loc(std::locale::classic(), &facet);
+ static const std::locale loc(std::locale::classic(),
+ new boost::posix_time::time_input_facet("%Y-%m-%dT%H:%M:%SZ"));
std::istringstream iss(str);
iss.imbue(loc);
boost::posix_time::ptime ptime(boost::date_time::not_a_date_time);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index c9152d775..3b0c84e49 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1496,7 +1496,7 @@ Value gettransaction(const Array& params, bool fHelp)
entry.push_back(Pair("details", details));
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
- ssTx << wtx;
+ ssTx << static_cast<CTransaction>(wtx);
string strHex = HexStr(ssTx.begin(), ssTx.end());
entry.push_back(Pair("hex", strHex));
@@ -1574,6 +1574,9 @@ Value walletpassphrase(const Array& params, bool fHelp)
"\nArguments:\n"
"1. \"passphrase\" (string, required) The wallet passphrase\n"
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
+ "\nNote:\n"
+ "Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock\n"
+ "time that overrides the old one.\n"
"\nExamples:\n"
"\nunlock the wallet for 60 seconds\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\" 60") +