Thomas Snider
81a3857c4e
Deduplicated sigaction() boilerplate
2017-03-24 10:32:56 -07:00
Jonas Schnelli
1df08d1580
Add assertion for CanSupportFeature(FEATURE_HD_SPLIT)
2017-03-24 10:57:55 +01:00
Jonas Schnelli
cd468d07d5
Define CWallet::DeriveNewChildKey() as private
2017-03-24 10:57:31 +01:00
Jonas Schnelli
ed79e4f497
Optimize GetOldestKeyPoolTime(), return as soon as we have both oldest keys
2017-03-24 10:54:48 +01:00
Jonas Schnelli
771a304ffe
Make sure we set the wallets min version to FEATURE_HD_SPLIT at the very first point
2017-03-24 10:53:35 +01:00
Jonas Schnelli
003e197498
Remove FEATURE_HD_SPLIT bump TODO
2017-03-24 10:28:40 +01:00
Jonas Schnelli
d9638e5aa4
Overhaul the internal/external key derive switch
2017-03-24 10:28:40 +01:00
Jonas Schnelli
1090502c3e
Fix superfluous cast and code style nits in RPC wallet-hd.py test
2017-03-24 10:28:40 +01:00
Jonas Schnelli
58e148333e
CKeyPool avoid "catch (...)" in SerializationOp
2017-03-24 10:28:40 +01:00
Jonas Schnelli
e138876f0a
Only show keypoolsize_hd_internal if HD split is enabled
2017-03-24 10:28:40 +01:00
Jonas Schnelli
add38d9b83
GetOldestKeyPoolTime: if HD & HD Chain Split is enabled, response max(oldest-internal-key, oldest-external-key)
2017-03-24 10:28:39 +01:00
Jonas Schnelli
dd526c2a2d
Don't switch to HD-chain-split during wallet encryption of non HD-chain-split wallets
2017-03-24 10:28:39 +01:00
Jonas Schnelli
79df9df348
Switch to 100% for the HD internal keypool size
2017-03-24 10:28:39 +01:00
Jonas Schnelli
bcafca1077
Make sure we always generate one keypool key at minimum
2017-03-24 10:28:39 +01:00
Jonas Schnelli
d0a627a53a
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
2017-03-24 10:28:39 +01:00
Jonas Schnelli
9af8f00a75
Make sure we hand out keypool keys if HD_SPLIT is not enabled
2017-03-24 10:28:38 +01:00
Jonas Schnelli
469a47b760
Make sure ReserveKeyFromKeyPool only hands out internal keys if HD_SPLIT is supported
2017-03-24 10:28:38 +01:00
Jonas Schnelli
05a9b493eb
Fix wrong keypool internal size in RPC getwalletinfo help
2017-03-24 10:28:38 +01:00
Jonas Schnelli
01de822c8d
Removed redundant IsLocked() check in NewKeyPool()
2017-03-24 10:28:38 +01:00
Jonas Schnelli
d59531ddfc
Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
2017-03-24 10:28:37 +01:00
Jonas Schnelli
02592f4c5e
[Wallet] split the keypool in an internal and external part
2017-03-24 10:28:37 +01:00
Thomas Snider
c59aedc1b0
[trivial] Dead code removal
2017-03-23 15:08:54 -07:00
Eric Shaw Jr
9ab9e7d1b3
Add a button to open the config file in a text editor
2017-03-23 12:54:36 -04:00
Jonas Schnelli
3568b30ca3
Merge #9500 : [Qt][RPC] Autocomplete commands for 'help' command in debug console
...
6d8fe35
'help' rpc commands autocomplete (Andrew Chow)
Tree-SHA512: 289bc4fa16a1c0291262998caa18556f1c5aa89662c85528606dc03b596b8833a0fb2c5c9c068b6dcf2adb3a136d4f154591d4a95b8c3313638b77355aaed955
2017-03-23 08:27:16 +01:00
Jonas Schnelli
7b585cf70e
Merge #9558 : Clarify assumptions made about when BlockCheck is called
...
c4a6929
Clarify assumptions made about when BlockCheck is called (Matt Corallo)
Tree-SHA512: 2eceb0c4f06c7fd6b290b93843bda11a4b63131559c5e8226bfec84596ed4e54ee6d8f5bc9cf789a80675be8b8079cf9234c96032df306258cb2260b9d8c7825
2017-03-23 08:18:43 +01:00
Jonas Schnelli
86f7d5b69b
Merge #10029 : Fix parameter naming inconsistencies between .h and .cpp files
...
97b8213
Fix parameter naming inconsistencies between .h and .cpp files (practicalswift)
Tree-SHA512: 4f46cc3973a898d2478bdb1b8c8d1829c3a7298b63bc47359c5dc2f135466773072d9672134ef3e7557dfc913720e49b675176b9e435b8bd1992af9ad53866e4
2017-03-23 08:16:27 +01:00
Karl-Johan Alm
5ba61f0034
[zmq] Call va_end() on va_start()ed args.
2017-03-22 12:56:44 -07:00
Kalle Alm
fd369d267b
Switched httpserver.cpp to use RAII wrapped libevents.
2017-03-22 10:32:58 -07:00
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.
2017-03-22 11:17:17 -04:00
Jonas Schnelli
90586b6897
Merge #10045 : [trivial] Fix typos in comments
...
dbf30ff
[trivial] Fix typos in comments (practicalswift)
Tree-SHA512: a841c96ba1a80ab57206e8ef4fa9b40ecff2244075a5539fc09f57e763bf2e92b0ed089e32a0dbac3902518dcda43d224f75a3462a560148841746560640ba70
2017-03-22 08:38:24 +01:00
practicalswift
dbf30ff10f
[trivial] Fix typos in comments
2017-03-21 19:49:08 +01:00
Wladimir J. van der Laan
919aaf6508
Merge #10039 : Fix compile errors with Qt 5.3.2 and Boost 1.55.0
...
b5bec4e
Avoid QTimer::singleShot compile error with Qt 5.3.2 (Russell Yanofsky)
d5046e7
Avoid scoped_connection compile error with boost 1.55.0 (Russell Yanofsky)
Tree-SHA512: 96362b872817681b062e05c8fcb76cfc23b6e87e0371584a6aae0e17535fd34ccdba922380aa4b669a8e75ef3f9fadd25061541f77cb3198173f04249a7bcd62
2017-03-21 11:46:55 +01:00
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
2017-03-20 12:35:37 -04:00
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
2017-03-20 12:27:07 -04:00
John Newbery
63d66ba20a
Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.py
2017-03-20 10:40:31 -04:00
Wladimir J. van der Laan
d34995a7ba
Merge #10038 : Add mallocinfo mode to getmemoryinfo
RPC
...
e141aa4
Add mallocinfo mode to `getmemoryinfo` RPC (Wladimir J. van der Laan)
Tree-SHA512: e778631765c29b3b5fb94eb66e5f50a8f108a234891bdcc4883f1e6e2fdd223f7660fad987eb2d7cbda5b800482d78adc1a309a3f6f83a84c556af43ebee2ed7
2017-03-20 15:05:56 +01:00
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.
2017-03-20 10:30:18 +01:00
James Evans
05a9f22358
Trivial: Fix typo in help getrawtransaction RPC
2017-03-20 05:19:41 -03:00
Wladimir J. van der Laan
5c1a958124
Merge #10027 : Set to nullptr after delete
...
d93b97f
Set to nullptr after delete (practicalswift)
Tree-SHA512: 7201cef4541557ffe31f52ce7527c4b08a2ff5aa1eae5268bdfee5b4843881f8fd115257bef6d1b4dfb71166951950a912ce87aef160ca89c2ca2ae264cfab1b
2017-03-20 08:39:18 +01:00
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);
2017-03-19 16:14:29 +01:00
Michael Goldstein
f490dae56b
Trivial: Fix typo in key.h comment
2017-03-18 18:13:55 -07:00
practicalswift
d93b97fbcf
Set to nullptr after delete
2017-03-18 12:40:58 +01:00
Wladimir J. van der Laan
baae3149d6
Merge #9911 : Wshadow: various gcc fixes
...
d7f80b6
Rename first iterator to prevent shadowing. (Pavel Janík)
b42ff60
Fix shadowing of local variables. (Pavel Janík)
c4b60b3
Make some global variables less-global (static) (Pavel Janík)
bb2aaee
Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1. (Pavel Janík)
Tree-SHA512: 3aea4e28146c8f2a31351c6e2b0cce88b6f1e567a0ea0e6131624453e7193d0904e30d81b1439d8c69e281cf0e369b895851fb882ae48d5967b5c2e2c227404e
2017-03-18 11:00:16 +01:00
Wladimir J. van der Laan
a328904480
Merge #9999 : [LevelDB] Plug leveldb logs to bitcoin logs
...
cfce581
[LevelDB] Plug leveldb logs to bitcoin logs (NicolasDorier)
Tree-SHA512: e40a2c2644c269bb2da7be04aec39ff64ad350d508391750a757955ed3f9d96998775d01e04b282a75b36d776c3960a345cc7b6f1466e6ae167d27518bf4baee
2017-03-18 10:58:22 +01:00
Wladimir J. van der Laan
aab1e55860
Merge #9987 : Remove unused code
...
8dc957a
Remove unused code (practicalswift)
Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
2017-03-18 10:10:33 +01:00
Pavel Janík
d7f80b6dcb
Rename first iterator to prevent shadowing.
2017-03-18 07:59:51 +01:00
Pavel Janík
b42ff60c7e
Fix shadowing of local variables.
2017-03-18 07:59:50 +01:00
Pavel Janík
c4b60b3d9c
Make some global variables less-global (static)
2017-03-18 07:59:50 +01:00
Pavel Janík
bb2aaeeeea
Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.
2017-03-18 07:59:50 +01:00
Wladimir J. van der Laan
3d857f307b
Merge #9818 : Save watch only key timestamps when reimporting keys
...
7759aa2
Save watch only key timestamps when reimporting keys (Russell Yanofsky)
Tree-SHA512: 433b5a78e5626fb2f3166e6c84c22eabd5239d451dc82694da95af237e034612a24f1a8bc959b7d2f2e576ce0b679be1fa4af929ebfae758c7e832056ab67061
2017-03-17 21:52:14 +01:00