Age | Commit message (Collapse) | Author |
|
Add dumpwallet and importwallet RPC commands
|
|
dumpwallet: produce a dump of all keys in a wallet, in a format
compatible with Bitcoin Wallet for Android and Multibit.
importwallet: import such a dump
|
|
|
|
Move pMiningKey init out of StartRPCThreads
|
|
Use boost::asio::deadline_timer for walletpassphrase timeout
|
|
This commit decouples the pMiningKey initialization and shutdown from the RPC
threads.
`getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran
from the debug window in the UI even when the RPC server is not running.
Solves issue #2706.
|
|
Fixes issue#2687
|
|
New method in bitcoinrpc: RunLater, that uses a map of deadline
timers to run a function later.
Behavior of walletpassphrase is changed; before, calling
walletpassphrase again before the lock timeout passed
would result in: Error: Wallet is already unlocked.
You would have to call lockwallet before walletpassphrase.
Now: the last walletpassphrase with correct password
wins, and overrides any previous timeout.
Fixes issue# 1961 which was caused by spawning too many threads.
Test plan:
Start with encrypted wallet, password 'foo'
NOTE:
python -c 'import time; print("%d"%time.time())'
... will tell you current unix timestamp.
Try:
walletpassphrase foo 600
getinfo
EXPECT: unlocked_until is about 10 minutes in the future
walletpassphrase foo 1
sleep 2
sendtoaddress mun74Bvba3B1PF2YkrF4NsgcJwHXXh12LF 11
EXPECT: Error: Please enter the wallet passphrase with walletpassphrase first.
walletpassphrase foo 600
walletpassphrase foo 0
getinfo
EXPECT: wallet is locked (unlocked_until is 0)
walletpassphrase foo 10
walletpassphrase foo 600
getinfo
EXPECT: wallet is unlocked until 10 minutes in future
walletpassphrase foo 60
walletpassphrase bar 600
EXPECT: Error, incorrect passphrase
getinfo
EXPECT: wallet still scheduled to lock 60 seconds from first (successful) walletpassphrase
|
|
|
|
unlocked could be confused with wallet encryption
|
|
|
|
|
|
and associated RPC "listlockunspent".
This is a memory-only filter, which is empty when a node restarts.
|
|
This is to support the signrawtransaction API call; given the public
keys involved in a multisig transaction, this gives back the redeemScript
needed to sign it.
|
|
|
|
|
|
Replace all "magic values" in RPCError(...) by constants.
|
|
Signed-off-by: Gregory Maxwell <greg@xiph.org>
|
|
RPC: add facility to enable RPCs to run outside cs_main, wallet locks
|
|
Use with 'stop' and 'help' RPCs.
This provides a facility to individually evaluate the locking for an RPC, and
potentially make it more parallel.
|
|
|
|
Move code to new modules rpcwallet.cpp, rpcblockchain.cpp
|
|
|
|
|
|
Allows the user to pass null as the second or third parameter
to signrawtransaction, in case you need to (for example) fetch
private keys from the wallet but want to specify the hash type.
|
|
|
|
|
|
rather than at each include site.
Fixes #1371
|
|
I originally created a pull to replace the "COPYING" in crypter.cpp and
crypter.h, but it turned out that COPYING was actually the correct
file.
|
|
Change internal HTTP JSON-RPC server from single-threaded to
thread-per-connection model. The IP filter list is applied prior to starting
the thread, which then processes the RPC.
A mutex covers the entire RPC operation, because not all RPC operations are
thread-safe.
[minor modifications by jgarzik, to make change upstream-ready]
|
|
|
|
|
|
|
|
|
|
|