Cory Fields
e025246fe2
scheduler: fix sub-second precision with boost < 1.50
8 years ago
Awemany
eb66bf9bdd
bitcoin-tx: Fix missing range check
...
The number of arguments is not checked MutateTxAddOutAddr(..), meaning
that
> ./bitcoin-tx -create outaddr=
accessed the vStrInputParts vector beyond its bounds.
This also includes work by jnewbery to check the inputs for
MutateTxAddPubKey()
8 years ago
Pieter Wuille
7228ce853d
Compensate for memory peak at flush time
8 years ago
Wladimir J. van der Laan
625488ace5
util: Work around (virtual) memory exhaustion on 32-bit w/ glibc
...
glibc-specific: On 32-bit systems set the number of arenas to 1. By
default, since glibc 2.10, the C library will create up to two heap
arenas per core. This is known to cause excessive virtual address space
usage in our usage. Work around it by setting the maximum number of
arenas to 1.
8 years ago
Suhas Daftuar
011124a2b2
Update benchmarking with package statistics
8 years ago
Suhas Daftuar
42cd8c890f
Add benchmarking for CreateNewBlock
8 years ago
Suhas Daftuar
eed816af6c
Mining: return early when block is almost full
8 years ago
Wladimir J. van der Laan
f885b67029
refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit
8 years ago
Ryan Havar
53351321c4
ApproximateBestSubset should take inputs by reference, not value
8 years ago
Jonas Schnelli
4115af7ac7
Fix rebase issue where pwalletMain was used instead of pwallet
...
Ser./Deser. nInternalChainCounter as last element
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
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
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
Karl-Johan Alm
5ba61f0034
[zmq] Call va_end() on va_start()ed args.
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