Age | Commit message (Collapse) | Author |
|
The new class is accessed via the Params() method and holds
most things that vary between main, test and regtest networks.
The regtest mode has two purposes, one is to run the
bitcoind/bitcoinj comparison tool which compares two separate
implementations of the Bitcoin protocol looking for divergence.
The other is that when run, you get a local node which can mine
a single block instantly, which is highly convenient for testing
apps during development as there's no need to wait 10 minutes for
a block on the testnet.
|
|
Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
|
|
getrawtransaction, but defaulting to 1 for backward compatibility
|
|
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
section
|
|
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
|
|
Previously, JSON-RPC clients accessed URI "/", and the JSON-RPC server
did not care about the URI at all, and would accept any URI as valid.
Change the JSON-RPC server to require URI "/" for all current accesses.
This changes enables the addition of future interfaces at different
URIs, such as pull request #1982 which demonstrates HTTP REST wallet
download.
Or, a future, breaking change in JSON-RPC interface could be introduced
by serving JSON-RPC calls from new URI "/v2/".
|
|
|
|
|
|
Two reasons for this change:
1. Need to always use boost::thread's sleep, even on Windows, so the
sleeps can be interrupted (prior code used Windows' built-in Sleep).
2. I always forgot what units the old Sleep took.
|
|
- also includes a small change to a string in bitcoinrpc.cpp, which is not
on Transifex anyway, so is safe to merge
|
|
|
|
unlocked could be confused with wallet encryption
|
|
|
|
|
|
|
|
|
|
- just replaces a character in a comment, which I had problems with when
opening the file in Qt Creator IDE
|
|
|
|
Add new RPC "lockunspent", to prevent spending of selected outputs
|
|
- fix ThreadSafeMessageBox always displays error icon
- allow to specify MSG_ERROR / MSG_WARNING or MSG_INFORMATION without a
custom caption / title
- allow to specify CClientUIInterface::ICON_ERROR / ICON_WARNING and
ICON_INFORMATION (which is default) as message box icon
- remove CClientUIInterface::OK from ThreadSafeMessageBox-calls, as
the OK button will be set as default, if none is specified
- prepend "Bitcoin - " to used captions
- rename BitcoinGUI::error() -> BitcoinGUI::message() and add function
documentation
- change all style parameters and enum flags to unsigned
- update code to use that new API
- update Client- and WalletModel to use new BitcoinGUI::message() and
rename the classes error() method into message()
- include the possibility to supply the wanted icon for messages from
Client- and WalletModel via "style" parameter
|
|
and associated RPC "listlockunspent".
This is a memory-only filter, which is empty when a node restarts.
|
|
Added security measure.
|
|
remove printf redefinition from bitcoinrpc.cpp
|
|
The base bits of pull req #1982.
|
|
rather than reusing ReadHTTPStatus() from the client mode.
The following additional HTTP request validations are added, both in line with
existing HTTP client practice:
1) HTTP method must be GET or POST. Most clients use POST, some
use GET. Either way, this continues to work.
2) HTTP URI must start with "/" character.
Normal URI is "/" (a 1-char string), so this is fine.
|
|
ReadHTTPStatus() is currently overloaded: In client mode, it properly parses
and receives an HTTP status line. In server mode, it incorrectly parses the
HTTP request line as an HTTP status line.
This server mode bug has never mattered, because the RPC server never
cared about the URI (path) provided in the HTTP request. That will change in
the future, so go ahead and begin fixing the problem.
This patch is cosmetic, and should result in NO behavior changes.
Further renames:
ReadHTTPHeader -> ReadHTTPHeaders
ReadHTTP -> ReadHTTPMessage
|
|
As the only BDB database left is the wallet, and it is always
detached.
Also remove IsChainFile() predicate and related chainfile-specific
logic.
|
|
- as the redefiniton of printf happens in util.h, which is included in
bitcoinrpc.cpp, we don't need another redefinition
|
|
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.
|
|
|
|
- also includes the required bitcoinstrings.cpp update
|
|
|
|
Replace all "magic values" in RPCError(...) by constants.
|
|
|
|
|
|
Fix: when testnet=1 specified, change default RPC port to 18332
|
|
|
|
Adds a stopdetach <detach> RPC command. <detach> defaults to true. Wor...
|
|
just like stop, but overrides the commandline/config file
-detachdb option. Useful for upgrading, for example. Lets you use fast stops usually, but force a detach when needed. Also, allows
you to do a fast stop in a system normally configured for fast stops.
|
|
fix signed/unsigned in strprintf and CNetAddr::GetByte()
|
|
|
|
- I checked every occurance of strprintf() in the code and used %u, where
unsigned vars are used
- the change to GetByte() was made, as ip is an unsigned char
|
|
Instead, fall back to IPv4 listening.
|
|
Prevent clash with win32 API symbol
|
|
Listunspent txout address filtering and listaddressgroupings
|
|
|