Russell Yanofsky
e9a64615c8
Make qt wallet test compatible with qt4
...
Unlike Qt5, the Qt4 signals implementation doesn't allow a signal to be
directly connected to a c++ lambda expression. Work around this by defining a
Callback QObject with a virtual method that can forward calls to a closure.
The Qt4 error was reported by Patrick Strateman <patrick.strateman@gmail.com>
in https://github.com/bitcoin/bitcoin/pull/10039#issuecomment-289248763
8 years ago
Wladimir J. van der Laan
8d8f28dd52
refactor: Move RPCNotifyBlockChange out of `rpc/server.h`
8 years ago
Wladimir J. van der Laan
e6dcfeec05
refactor: Move GetDifficulty out of `rpc/server.h`
...
It has no business in `rpcserver.h`. Define it in the interface header
of the implementation unit `rpcblockchain` where it is defined.
Also modernize the signature to:
double GetDifficulty(const CBlockIndex* blockindex = nullptr);
(remove `extern`, replace `NULL` with `nullptr`)
8 years ago
Jonas Schnelli
7278537730
[Qt] Don't add arguments of sensitive command to console window
8 years ago
Jonas Schnelli
9382f0425e
Do not break backward compatibility during wallet encryption
8 years ago
Jameson Lopp
0fb288725b
Move several relay options into the Relay help group
8 years ago
Jameson Lopp
1403b1a689
move rpcserialversion into RPC option group
8 years ago
Jameson Lopp
d5690f1ab8
remove 'noconnect' option from documentation
8 years ago
MarcoFalke
fa55853219
rpc: Rename first named arg of createrawtransaction
8 years ago
Andrew Chow
4df76e270c
Ensure an item exists on the rpcconsole stack before adding
...
Ensures that there is an item on the rpcconsole stack before adding something to the current stack so that a segmentation fault does not occur.
8 years ago
Matthew Zipkin
b1f584dbc1
fix build if spaces in src dir path
8 years ago
Matthew Zipkin
557c9a68fb
RPC: getblockchaininfo: BIP9 stats
...
add RPC tests for BIP9 counting stats
8 years ago
Thomas Snider
81a3857c4e
Deduplicated sigaction() boilerplate
8 years ago
Jonas Schnelli
1df08d1580
Add assertion for CanSupportFeature(FEATURE_HD_SPLIT)
8 years ago
Jonas Schnelli
cd468d07d5
Define CWallet::DeriveNewChildKey() as private
8 years ago
Jonas Schnelli
ed79e4f497
Optimize GetOldestKeyPoolTime(), return as soon as we have both oldest keys
8 years ago
Jonas Schnelli
771a304ffe
Make sure we set the wallets min version to FEATURE_HD_SPLIT at the very first point
8 years ago
Jonas Schnelli
003e197498
Remove FEATURE_HD_SPLIT bump TODO
8 years ago
Jonas Schnelli
d9638e5aa4
Overhaul the internal/external key derive switch
8 years ago
Jonas Schnelli
1090502c3e
Fix superfluous cast and code style nits in RPC wallet-hd.py test
8 years ago
Jonas Schnelli
58e148333e
CKeyPool avoid "catch (...)" in SerializationOp
8 years ago
Jonas Schnelli
e138876f0a
Only show keypoolsize_hd_internal if HD split is enabled
8 years ago
Jonas Schnelli
add38d9b83
GetOldestKeyPoolTime: if HD & HD Chain Split is enabled, response max(oldest-internal-key, oldest-external-key)
8 years ago
Jonas Schnelli
dd526c2a2d
Don't switch to HD-chain-split during wallet encryption of non HD-chain-split wallets
8 years ago
Jonas Schnelli
79df9df348
Switch to 100% for the HD internal keypool size
8 years ago
Jonas Schnelli
bcafca1077
Make sure we always generate one keypool key at minimum
8 years ago
Jonas Schnelli
d0a627a53a
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
8 years ago
Jonas Schnelli
9af8f00a75
Make sure we hand out keypool keys if HD_SPLIT is not enabled
8 years ago
Jonas Schnelli
469a47b760
Make sure ReserveKeyFromKeyPool only hands out internal keys if HD_SPLIT is supported
8 years ago
Jonas Schnelli
05a9b493eb
Fix wrong keypool internal size in RPC getwalletinfo help
8 years ago
Jonas Schnelli
01de822c8d
Removed redundant IsLocked() check in NewKeyPool()
8 years ago
Jonas Schnelli
d59531ddfc
Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
8 years ago
Jonas Schnelli
02592f4c5e
[Wallet] split the keypool in an internal and external part
8 years ago
Thomas Snider
c59aedc1b0
[trivial] Dead code removal
8 years ago
Eric Shaw Jr
9ab9e7d1b3
Add a button to open the config file in a text editor
8 years ago
Karl-Johan Alm
5ba61f0034
[zmq] Call va_end() on va_start()ed args.
8 years ago
Kalle Alm
fd369d267b
Switched httpserver.cpp to use RAII wrapped libevents.
8 years ago
John Newbery
91c91e140a
Control mempool persistence using a command line parameter.
...
Mempool persistence was added in
3f78562df5
, and is always on. This commit
introduces a command-line parameter -persistmempool, which defaults to
true. When set to false:
- mempool.dat is not loaded when the node starts.
- mempool.dat is not written when the node stops.
8 years ago
practicalswift
dbf30ff10f
[trivial] Fix typos in comments
8 years ago
Russell Yanofsky
b5bec4e330
Avoid QTimer::singleShot compile error with Qt 5.3.2
...
Construct QTimer object directly, instead of relying on QTimer::singleShot
overloads accepting lambdas, which weren't introduced until Qt 5.4.
Avoids the following compile error in debian jessie:
```
qt/test/wallettests.cpp: In function ‘void {anonymous}::ConfirmSend()’:
qt/test/wallettests.cpp:34:6: error: no matching function for call to ‘QTimer::singleShot(int, Qt::TimerType, {anonymous}::ConfirmSend()::<lambda()>)’
});
^
qt/test/wallettests.cpp:34:6: note: candidates are:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTimer:1:0,
from ./qt/sendcoinsdialog.h:13,
from qt/test/wallettests.cpp:7:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note: static void QTimer::singleShot(int, const QObject*, const char*)
static void singleShot(int msec, const QObject *receiver, const char *member);
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note: no known conversion for argument 2 from ‘Qt::TimerType’ to ‘const QObject*’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note: static void QTimer::singleShot(int, Qt::TimerType, const QObject*, const char*)
static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member);
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note: candidate expects 4 arguments, 3 provided
```
Error reported by Pavel Janík <Pavel@Janik.cz> in
https://github.com/bitcoin/bitcoin/pull/9974#issuecomment-287574436
8 years ago
Russell Yanofsky
d5046e72f4
Avoid scoped_connection compile error with boost 1.55.0
...
Construct scoped_connection directly instead of relying on copy initialization
and move constructor. Avoids the following compile error in debian jessie:
```
In file included from /usr/include/boost/signals2/signal.hpp:21:0,
from ./util.h:29,
from ./dbwrapper.h:11,
from ./txdb.h:10,
from ./test/test_bitcoin.h:11,
from qt/test/wallettests.cpp:11:
/usr/include/boost/signals2/connection.hpp: In function ‘uint256 {anonymous}::SendCoins(CWallet&, SendCoinsDialog&, const CBitcoinAddress&, CAmount)’:
/usr/include/boost/signals2/connection.hpp:234:7: error: ‘boost::signals2::scoped_connection::scoped_connection(const boost::signals2::scoped_connection&)’ is private
scoped_connection(const scoped_connection &other);
^
qt/test/wallettests.cpp:47:6: error: within this context
});
^
```
Error reported by Pavel Janík <Pavel@Janik.cz> in
https://github.com/bitcoin/bitcoin/pull/9974#issuecomment-287550034
8 years ago
John Newbery
63d66ba20a
Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.py
8 years ago
Wladimir J. van der Laan
e141aa4ba6
Add mallocinfo mode to `getmemoryinfo` RPC
...
This adds a mode argument to `getmemoryinfo`. By default the output
will remain the same. However if a mode argument of `mallocinfo` is
provided the result of glibc `malloc_info` (if available) will
be returned as a string, as-is.
This is useful for tracking heap usage over time or troubleshooting
memory fragmentation issues.
8 years ago
James Evans
05a9f22358
Trivial: Fix typo in help getrawtransaction RPC
8 years ago
practicalswift
97b8213674
Fix parameter naming inconsistencies between .h and .cpp files
...
Inconsistencies prior to this commit:
* serializeFlags vs serialFlags
src/core_io.h:std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
src/core_write.cpp:std::string EncodeHexTx(const CTransaction& tx, const int serialFlags)
* statusOut vs outStatus
src/rpc/server.h:bool RPCIsInWarmup(std::string *statusOut);
src/rpc/server.cpp:bool RPCIsInWarmup(std::string *outStatus)
* hashesToUpdate vs vHashesToUpdate
src/txmempool.h: void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate);
src/txmempool.cpp:void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate)
* nPruneUpToHeight vs nManualPruneHeight
src/validation.h:void PruneBlockFilesManual(int nPruneUpToHeight);
src/validation.cpp:void PruneBlockFilesManual(int nManualPruneHeight);
8 years ago
Michael Goldstein
f490dae56b
Trivial: Fix typo in key.h comment
8 years ago
practicalswift
d93b97fbcf
Set to nullptr after delete
8 years ago
Pavel Janík
d7f80b6dcb
Rename first iterator to prevent shadowing.
8 years ago
Pavel Janík
b42ff60c7e
Fix shadowing of local variables.
8 years ago
Pavel Janík
c4b60b3d9c
Make some global variables less-global (static)
8 years ago