Commit graph

8169 commits

Author SHA1 Message Date
Wladimir J. van der Laan f53023dbb8
Merge #9067: Fix exit codes
4441018 Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers (UdjinM6)
bd0de13 Fix exit codes: - `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` (UdjinM6)
2016-11-08 10:55:03 +01:00
Jonas Schnelli b8f43e3331
Merge #9095: test: Fix test_random includes
fa8278e test: Fix test_random includes (MarcoFalke)
2016-11-08 08:41:57 +01:00
Pieter Wuille dc6b9406bd
Merge #9026: Fix handling of invalid compact blocks
d4833ff Bump the protocol version to distinguish new banning behavior. (Suhas Daftuar)
88c3549 Fix compact block handling to not ban if block is invalid (Suhas Daftuar)
c93beac [qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
2016-11-07 18:11:18 -08:00
Pieter Wuille 9f554e03eb
Merge #9045: Hash P2P messages as they are received instead of at process-time
fe1dc62 Hash P2P messages as they are received instead of at process-time (Matt Corallo)
2016-11-07 14:19:44 -08:00
Pieter Wuille d59a518466 Use fixed preallocation instead of costly GetSerializeSize
Dbwrapper used GetSerializeSize() to compute the size of the buffer
to preallocate. For some cases (specifically: CCoins) this requires
a costly compression call. Avoid this by just using fixed size
preallocations instead.
2016-11-07 13:56:27 -08:00
Pieter Wuille 25a211aa9e Add optimized CSizeComputer serializers
To get the advantages of faster GetSerializeSize() implementations
back that were removed in "Make GetSerializeSize a wrapper on top of
CSizeComputer", reintroduce them in the few places in the form of a
specialized Serialize() implementation. This actually gets us in a
better state than before, as these even get used when they're invoked
indirectly in the serialization of another object.
2016-11-07 13:56:27 -08:00
Pieter Wuille a2929a26f5 Make CSerAction's ForRead() constexpr
The CSerAction's ForRead() method does not depend on any runtime
data, so guarantee that requests to it can be optimized out by
making it constexpr.

Suggested by Cory Fields.
2016-11-07 13:56:27 -08:00
Pieter Wuille a603925c77 Avoid -Wshadow errors
Suggested by Pavel Janik.
2016-11-07 13:56:27 -08:00
Pieter Wuille 528472111b Get rid of nType and nVersion
Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.

Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
2016-11-07 13:56:27 -08:00
Pieter Wuille 657e05ab2e Make GetSerializeSize a wrapper on top of CSizeComputer
Given that in default GetSerializeSize implementations created by
ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid
of the specialized GetSerializeSize methods everywhere, and just use
CSizeComputer. This removes a lot of code which isn't actually used
anywhere.

For CCompactSize and CVarInt this actually removes a more efficient
size computing algorithm, which is brought back in a later commit.
2016-11-07 13:56:22 -08:00
Pieter Wuille fad9b66504 Make nType and nVersion private and sometimes const
Make the various stream implementations' nType and nVersion private
and const (except in CDataStream where we really need a setter).
2016-11-07 13:49:11 -08:00
Russell Yanofsky dac53b58b5 Modify getblocktxn handler not to drop requests for old blocks
The current getblocktxn implementation drops and ignores requests for old
blocks, which causes occasional sync_block timeouts during the
p2p-compactblocks.py test as reported in
https://github.com/bitcoin/bitcoin/issues/8842.

The p2p-compactblocks.py test setup creates many new blocks in a short
period of time, which can lead to getblocktxn requests for blocks below the
hardcoded depth limit of 10 blocks. This commit changes the getblocktxn
handler not to ignore these requests, so the peer nodes in the test setup
will reliably be able to sync.

The protocol change is documented in BIP-152 update "Allow block responses
to getblocktxn requests" at https://github.com/bitcoin/bips/pull/469.

The protocol change is not expected to affect nodes running outside the test
environment, because there shouldn't normally be lots of new blocks being
rapidly added that need to be synced.
2016-11-07 14:35:11 -05:00
UdjinM6 4441018d08 Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers 2016-11-07 21:31:38 +03:00
Pieter Wuille c2c5d42f36 Make streams' read and write return void
The stream implementations had two cascading layers (the upper one
with operator<< and operator>>, and a lower one with read and write).
The lower layer's functions are never cascaded (nor should they, as
they should only be used from the higher layer), so make them return
void instead.
2016-11-07 09:39:46 -08:00
Pieter Wuille 50e8a9ccd7 Remove unused ReadVersion and WriteVersion
CDataStream and CAutoFile had a ReadVersion and WriteVersion method
that was never used. Remove them.
2016-11-07 09:39:46 -08:00
MarcoFalke fa8278e845 test: Fix test_random includes 2016-11-07 16:11:51 +01:00
Jonas Schnelli 78cdd643d3
Merge #9094: qt: Use correct conversion function for boost::path datadir
e760b30 qt: Use correct conversion function for boost::path datadir (Wladimir J. van der Laan)
2016-11-07 14:20:12 +01:00
Wladimir J. van der Laan 0b2322b144
Merge #8981: Wshadow: Do not shadow argument with a local variable
ff6639b Do not shadow local variable (Pavel Janík)
2016-11-07 13:44:00 +01:00
Wladimir J. van der Laan 8c6218a28a
Merge #8976: libconsensus: Add input validation of flags
5ca8ef2 libconsensus: Add input validation of flags (Wladimir J. van der Laan)
2016-11-07 13:41:39 +01:00
Wladimir J. van der Laan 3c03dc2cfc
Merge #7730: Remove priority estimation
0bd581a add release notes for removal of priority estimation (Alex Morcos)
b2322e0 Remove priority estimation (Alex Morcos)
2016-11-07 13:36:40 +01:00
Alex Morcos b2322e0fc6 Remove priority estimation 2016-11-07 13:22:34 +01:00
Wladimir J. van der Laan 1e50d22ed2
Merge #8709: Allow filterclear messages for enabling TX relay only.
1f951c6 Allow filterclear messages for enabling TX relay only. (R E Broadley)
2016-11-07 13:19:42 +01:00
Wladimir J. van der Laan c113a651f1
Merge #9052: Use RelevantServices instead of node_network in AttemptToEvict.
d32036a Use RelevantServices instead of node_network in AttemptToEvict. (Gregory Maxwell)
2016-11-07 13:14:04 +01:00
Wladimir J. van der Laan e760b307f6 qt: Use correct conversion function for boost::path datadir
Fixes #9089.
2016-11-07 12:57:07 +01:00
Wladimir J. van der Laan 44f2df613f
Merge #8675: Make copyright header lines uniform
4b04e32 [copyright] copyright header style uniform (isle2983)
2016-11-07 12:51:59 +01:00
Wladimir J. van der Laan 5fa7b07565
Merge #8736: base58: Improve DecodeBase58 performance.
e892dc1 Use prefix operator in for loop of DecodeBase58. (Jiaxing Wang)
159ed95 base58: Improve DecodeBase58 performance. (Jiaxing Wang)
2016-11-07 11:51:04 +01:00
Wladimir J. van der Laan c8c572f8f1
Merge #8708: net: have CConnman handle message sending
9027680 net: handle version push in InitializeNode (Cory Fields)
7588b85 net: construct CNodeStates in place (Cory Fields)
440f1d3 net: remove now-unused ssSend and Fuzz (Cory Fields)
5c2169c drop the optimistic write counter hack (Cory Fields)
ea33268 net: switch all callers to connman for pushing messages (Cory Fields)
3e32cd0 connman is in charge of pushing messages (Cory Fields)
b98c14c serialization: teach serializers variadics (Cory Fields)
2016-11-07 10:34:35 +01:00
Wladimir J. van der Laan 7b22e5001a
Merge #9070: Lockedpool fixes
b3ddc5e LockedPool: avoid quadratic-time allocation (Kaz Wesley)
0b59f80 LockedPool: fix explosion for illegal-sized alloc (Kaz Wesley)
21b8f3d LockedPool: test handling of invalid allocations (Kaz Wesley)
2016-11-07 09:21:23 +01:00
isle2983 4b04e32c20 [copyright] copyright header style uniform
Three categories of modifications:

1)

1 instance of 'The Bitcoin Core developers \n',
1 instance of 'the Bitcoin Core developers\n',
3 instances of 'Bitcoin Core Developers\n', and
12 instances of 'The Bitcoin developers\n'

are made uniform with the 443 instances of 'The Bitcoin Core developers\n'

2)

3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6
instances of 'BitPay Inc\.\n'

3)

4 instances where there was no '(c)' between the 'Copyright' and the year
where it deviates from the style of the local directory.
2016-11-06 10:12:50 -07:00
R E Broadley 77cbbd9ecf Make warning message about wallet balance possibly
being incorrect less ambiguous.

Fixes #9079
2016-11-06 15:49:03 +08:00
UdjinM6 bd0de1386e Fix exit codes:
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error)
- error reading config file should exit with `1`

Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
2016-11-04 18:40:33 +03:00
Matt Corallo 190fd321ad Remove unused CTxOut::GetHash() 2016-11-04 10:50:43 -04:00
Wladimir J. van der Laan ed64bcec2d
Merge #9069: Clean up bctest.py and bitcoin-util-test.py
2b175d4 Clean up bctest.py and bitcoin-util-test.py (John Newbery)
2016-11-04 08:31:23 +01:00
Cory Fields 902768099c net: handle version push in InitializeNode 2016-11-03 13:35:54 -07:00
Cory Fields 7588b85cd2 net: construct CNodeStates in place 2016-11-03 13:35:54 -07:00
Cory Fields 440f1d3e4c net: remove now-unused ssSend and Fuzz 2016-11-03 13:35:54 -07:00
Cory Fields 5c2169cc3f drop the optimistic write counter hack
This is now handled properly in realtime.
2016-11-03 13:35:54 -07:00
Cory Fields ea3326891d net: switch all callers to connman for pushing messages
Drop all of the old stuff.
2016-11-03 13:35:53 -07:00
Cory Fields 3e32cd09f6 connman is in charge of pushing messages
The changes here are dense and subtle, but hopefully all is more explicit
than before.

- CConnman is now in charge of sending data rather than the nodes themselves.
  This is necessary because many decisions need to be made with all nodes in
  mind, and a model that requires the nodes calling up to their manager quickly
  turns to spaghetti.

- The per-node-serializer (ssSend) has been replaced with a (quasi-)const
  send-version. Since the send version for serialization can only change once
  per connection, we now explicitly tag messages with INIT_PROTO_VERSION if
  they are sent before the handshake. With this done, there's no need to lock
  for access to nSendVersion.

  Also, a new stream is used for each message, so there's no need to lock
  during the serialization process.

- This takes care of accounting for optimistic sends, so the
  nOptimisticBytesWritten hack can be removed.

- -dropmessagestest and -fuzzmessagestest have not been preserved, as I suspect
  they haven't been used in years.
2016-11-03 13:32:09 -07:00
Cory Fields b98c14c4e3 serialization: teach serializers variadics
Also add a variadic CDataStream ctor for ease-of-use.
2016-11-03 13:32:09 -07:00
Wladimir J. van der Laan 82077ef6e4
Merge #9073: Trivial: Add common failure cases for rpc server connection failure
8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
2016-11-03 19:20:01 +01:00
Suhas Daftuar d4833ff747 Bump the protocol version to distinguish new banning behavior.
This allows future software that would relay compact blocks before
full validation to announce only to peers that will not ban if the
block turns out to be invalid.
2016-11-03 13:07:13 -04:00
Suhas Daftuar 88c35491ab Fix compact block handling to not ban if block is invalid 2016-11-03 13:07:12 -04:00
instagibbs 8f329f991b Add common failure cases for rpc server connection failure 2016-11-03 12:09:38 -04:00
Wladimir J. van der Laan 3665483be7
Merge #8969: Decouple peer-processing-logic from block-connection-logic (#2)
f5b960b Move nTimeBestReceived updating into net processing code (Matt Corallo)
d8670fb Move all calls to CheckBlockIndex out of net-processing logic (Matt Corallo)
d6ea737 Remove network state wipe from UnloadBlockIndex. (Matt Corallo)
fc0c24f Move MarkBlockAsReceived out of ProcessNewMessage (Matt Corallo)
65f35eb Move FlushStateToDisk call out of ProcessMessages::TX into ATMP (Matt Corallo)
2016-11-03 16:31:32 +01:00
John Newbery 2b175d4b01 Clean up bctest.py and bitcoin-util-test.py
- remove newlines
- change tabs for spaces, to align with convention in other py files
- add comments
- add 'Bitcoin Core Developers' copyright notice
2016-11-03 14:50:20 +00:00
Wladimir J. van der Laan fcf61b80fa
Merge #9050: net: make a few values immutable, and use deterministic randomness for the localnonce
59ac5c5 net: Use deterministic randomness for CNode's nonce, and make it const (Cory Fields)
aff6584 net: constify a few CNode vars to indicate that they're threadsafe (Cory Fields)
2016-11-03 10:45:18 +01:00
Wladimir J. van der Laan d1871da7fe
Merge #9071: Declare wallet.h functions inline
2ca882a Declare wallet.h functions inline (Pieter Wuille)
2016-11-03 10:22:11 +01:00
Pieter Wuille 508404de98
Merge #9053: IBD using chainwork instead of height and not using header timestamps
e141beb IsInitialBlockDownload no longer uses header-only timestamps. (Gregory Maxwell)
2082b55 Remove GetTotalBlocksEstimate and checkpoint tests that test nothing. (Gregory Maxwell)
fd46136 IBD check uses minimumchain work instead of checkpoints. (Gregory Maxwell)
2016-11-03 00:08:59 -07:00
Pieter Wuille ed0cc50afe
Merge #9036: wallet: Change default confirm target from 2 to 6
0fdf810 wallet: Change default confirm target from 2 to 6 (Wladimir J. van der Laan)
2016-11-02 23:36:27 -07:00
Pieter Wuille 2ca882ad41 Declare wallet.h functions inline 2016-11-02 17:29:16 -07:00
Kaz Wesley b3ddc5e76f LockedPool: avoid quadratic-time allocation
Use separate maps for used/free chunks to avoid linear scan through alloced
chunks for each alloc.
2016-11-02 16:52:56 -07:00
MarcoFalke c9bdf9a75f
Merge #9065: Merge doc/unit-tests.md into src/test/README.md
eedc461 Merge `doc/unit-tests.md` into `src/test/README.md` (Wladimir J. van der Laan)
2016-11-02 23:36:16 +01:00
Kaz Wesley 0b59f80625 LockedPool: fix explosion for illegal-sized alloc
Check for unreasonable alloc size in LockedPool rather than lancing through new
Arenas until we improbably find one worthy of the quixotic request or the system
can support no more Arenas.
2016-11-02 14:41:40 -07:00
Kaz Wesley 21b8f3db31 LockedPool: test handling of invalid allocations
(Currently fails due to bug)
2016-11-02 14:05:07 -07:00
Wladimir J. van der Laan 6a1343f73b
Merge #8977: [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)
cab1da7 [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
2016-11-02 21:37:43 +01:00
Wladimir J. van der Laan c05db83488
Merge #9013: Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB()
d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
2016-11-02 21:09:27 +01:00
Wladimir J. van der Laan bc785d7185
Merge #9042: [rpc] ParseHash: Fail when length is not 64
fa32619 [rpc] ParseHash: Fail when length is not 64 (MarcoFalke)
2016-11-02 21:04:20 +01:00
Wladimir J. van der Laan d316cfeb6e
Merge #9066: tests: Remove variable unused after refactoring
f91afe9 trivial: Remove variable unused after refactoring (Daniel Kraft)
2016-11-02 20:54:10 +01:00
Daniel Kraft f91afe9aac trivial: Remove variable unused after refactoring
Remove a variable that is now unused after the recent refactoring
(in 51f278329d) but has not been cleaned
up so far.
2016-11-02 19:31:19 +01:00
jnewbery 32c0d6e1d2 Add logging to bitcoin-util-test.py
- Use the python standard logging library
- Run all tests and report all failing test-cases (rather than stop after one test case fails)
- If output is different from expected output, log a contextual diff.
2016-11-02 18:16:57 +00:00
Wladimir J. van der Laan eedc461882 Merge doc/unit-tests.md into src/test/README.md
Refer to the right file in the top-level README.md.

Having only one file with test documentation saves some confusion about
where things are documented.
2016-11-02 18:19:43 +01:00
Wladimir J. van der Laan a4fd8dff68
Merge #8828: Move CWalletDB::ReorderTransactions to CWallet
86029e7 Move CWalletDB::ReorderTransactions to CWallet (Patrick Strateman)
2016-11-02 15:37:42 +01:00
Wladimir J. van der Laan 1107653d05
Merge #9060: trivial: fix bloom filter init to isEmpty = true
cccf73d trivial: fix bloom filter init to isEmpty = true (Robert McLaughlin)
2016-11-02 15:30:47 +01:00
Pavel Janík 4a9f3c50cc Do not shadow variable, use deprecated MAP_ANON if MAP_ANONYMOUS is not defined. 2016-11-02 14:18:19 +01:00
Wladimir J. van der Laan f8723d2318
Merge #8753: Locked memory manager
444c673 bench: Add benchmark for lockedpool allocation/deallocation (Wladimir J. van der Laan)
6567999 rpc: Add `getmemoryinfo` call (Wladimir J. van der Laan)
4536148 support: Add LockedPool (Wladimir J. van der Laan)
f4d1fc2 wallet: Get rid of LockObject and UnlockObject calls in key.h (Wladimir J. van der Laan)
999e4c9 wallet: Change CCrypter to use vectors with secure allocator (Wladimir J. van der Laan)
2016-11-02 11:16:29 +01:00
Wladimir J. van der Laan 6a8be7ba99
Merge #9032: test: Add format-dependent comparison to bctest
6c5cd9d test: Add format-dependent comparison to bctest (Wladimir J. van der Laan)
2016-11-02 11:15:36 +01:00
Wladimir J. van der Laan 101c642bef
Merge #8448: Store mempool and prioritization data to disk
582068a Add mempool.dat to doc/files.md (Pieter Wuille)
3f78562 Add DumpMempool and LoadMempool (Pieter Wuille)
ced7c94 Add AcceptToMemoryPoolWithTime function (Pieter Wuille)
c3efb58 Add feedelta to TxMempoolInfo (Pieter Wuille)
2016-11-02 11:12:58 +01:00
Gregory Maxwell e141beb6a9 IsInitialBlockDownload no longer uses header-only timestamps.
This avoids a corner case (mostly visible on testnet) where bogus
 headers can keep nodes in IsInitialBlockDownload.
2016-11-02 01:51:53 +00:00
Gregory Maxwell 2082b5574c Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.
GetTotalBlocksEstimate is no longer used and it was the only thing
 the checkpoint tests were testing.

Since checkpoints are on their way out it makes more sense to remove
 the test file than to cook up a new pointless test.
2016-11-02 01:49:45 +00:00
Gregory Maxwell fd46136dfa IBD check uses minimumchain work instead of checkpoints.
This introduces a 'minimum chain work' chainparam which is intended
 to be the known amount of work in the chain for the network at the
 time of software release.  If you don't have this much work, you're
 not yet caught up.

This is used instead of the count of blocks test from checkpoints.

This criteria is trivial to keep updated as there is no element of
subjectivity, trust, or position dependence to it. It is also a more
reliable metric of sync status than a block count.
2016-11-02 01:47:02 +00:00
Robert McLaughlin cccf73db04 trivial: fix bloom filter init to isEmpty = true
Fixes newly initialized bloom filters being
constructed with isEmpty(false), which still
works but loses the possible speedup when
checking for key membership in an empty filter.
2016-11-01 21:04:26 -04:00
Jonas Schnelli 273bde37d8
Merge #9043: [qt] Return useful error message on ATMP failure
3333e5a [qt] Return useful error message on ATMP failure (MarcoFalke)
2016-11-01 08:33:17 +01:00
Gregory Maxwell d32036a47d Use RelevantServices instead of node_network in AttemptToEvict.
Use of node_network here is really meant to be a proxy of "likely to
 send us blocks in the future".  RelevantServices is the right criteria
 now.
2016-11-01 00:11:52 +00:00
Cory Fields 59ac5c5b72 net: Use deterministic randomness for CNode's nonce, and make it const 2016-10-31 17:17:18 -04:00
Cory Fields aff6584e09 net: constify a few CNode vars to indicate that they're threadsafe 2016-10-31 17:17:18 -04:00
Matt Corallo f5b960be4e Move nTimeBestReceived updating into net processing code 2016-10-31 10:08:11 -04:00
Matt Corallo d8670fb103 Move all calls to CheckBlockIndex out of net-processing logic
This will result in many more calls to CheckBlockIndex when
connecting a list of headers (eg in ::HEADERS messages processing)
but its only enabled in debug mode, and that should mostly just be
during IBD, so it should be OK.
2016-10-31 10:08:11 -04:00
Matt Corallo d6ea737be1 Remove network state wipe from UnloadBlockIndex.
UnloadBlockIndex is only used during init if we end up reindexing
to clear our block state so that we can start over. However, at
that time no connections have been brought up as CConnman hasn't
been started yet, so all of the network processing state logic is
empty when its called.

Additionally, the initialization of the recentRejects set is moved
to InitPeerLogic.
2016-10-31 10:08:11 -04:00
Matt Corallo fc0c24f67b Move MarkBlockAsReceived out of ProcessNewMessage 2016-10-31 10:08:11 -04:00
Matt Corallo 65f35eb91b Move FlushStateToDisk call out of ProcessMessages::TX into ATMP 2016-10-31 10:08:11 -04:00
MarcoFalke fa326193ad [rpc] ParseHash: Fail when length is not 64 2016-10-31 10:46:52 +01:00
Pieter Wuille 3f78562df5 Add DumpMempool and LoadMempool 2016-10-31 00:10:36 -07:00
Pieter Wuille ced7c949e8 Add AcceptToMemoryPoolWithTime function 2016-10-30 23:24:41 -07:00
Pieter Wuille c3efb58622 Add feedelta to TxMempoolInfo 2016-10-30 23:12:09 -07:00
matthias 7f61b49de8 Change all instance of 'GMT epoch' to 'Unix epoch' 2016-10-31 01:11:46 +01:00
Matt Corallo fe1dc62cef Hash P2P messages as they are received instead of at process-time 2016-10-30 18:04:57 -04:00
MarcoFalke 3333e5a1e5 [qt] Return useful error message on ATMP failure 2016-10-30 18:23:37 +01:00
Patrick Strateman 86029e72c9 Move CWalletDB::ReorderTransactions to CWallet 2016-10-30 02:15:49 -07:00
Wladimir J. van der Laan 6c5cd9d022 test: Add format-dependent comparison to bctest
This splits the output comparison for `bitcoin-tx` into two steps:

- First, check for data mismatch, parsing the data as json or hex
  depending on the extension of the output file

- Then, check if the literal string matches

For either of these cases give a different error.

This prevents wild goose chases when e.g. a trailing space doesn't match
exactly, and makes sure that both test output and examples are valid
data of the purported format.
2016-10-28 14:20:59 +02:00
Wladimir J. van der Laan 0fdf810d26 wallet: Change default confirm target from 2 to 6
Recent discussion (in IRC meetings, and e.g. #8989) has shown a
preference for the default confirm target for smartfees to be 6 instead
of 2, to avoid overpaying fees for questionable gain.

6 is also a compromise between the GUI's pre-#8989 value of 25 and the
bitcoind `-txconfirmtarget` default of 2. These were unified in #8989,
but this has made the (overly expensive) default of 2 as GUI default.
2016-10-28 14:15:46 +02:00
Wladimir J. van der Laan d2143dc937
Merge #8989: [Qt] overhaul smart-fee slider, adjust default confirmation target
cfe77ef [Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899 [Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d CoinControl: add option for custom confirmation target (Jonas Schnelli)
2016-10-28 14:14:55 +02:00
Wladimir J. van der Laan 0dcb888266
Merge #9016: Return useful error message on ATMP failure
169bdab Return useful error message on ATMP failure (instagibbs)
2016-10-28 13:49:15 +02:00
Jonas Schnelli cfe77ef412
[Qt] overhaul smart-fee slider, adjust default confirmation target 2016-10-28 10:44:30 +02:00
Jonas Schnelli 6f0289967f
[Qt] Hide nTxConfirmTarget behind WalletModel 2016-10-28 10:44:30 +02:00
Jonas Schnelli 004168dcb7
CoinControl: add option for custom confirmation target 2016-10-28 10:44:30 +02:00
S. Matthew English 1c3ecc70c8 instance of 'mem pool' to 'mempool'
there was only one instance of  'mem pool' and not 'mempool', so I changed it to conform to the others
2016-10-27 16:45:09 +02:00
Wladimir J. van der Laan 444c673d85 bench: Add benchmark for lockedpool allocation/deallocation 2016-10-27 13:17:26 +02:00
Wladimir J. van der Laan 6567999096 rpc: Add getmemoryinfo call
```
getmemoryinfo
Returns an object containing information about memory usage.

Result:
{
  "locked": {               (json object) Information about locked memory manager
    "used": xxxxx,          (numeric) Number of bytes used
    "free": xxxxx,          (numeric) Number of bytes available in current arenas
    "total": xxxxxxx,       (numeric) Total number of bytes managed
    "locked": xxxxxx,       (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
  }
}

Examples:
> bitcoin-cli getmemoryinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
```
2016-10-27 13:17:26 +02:00
Wladimir J. van der Laan 4536148b15 support: Add LockedPool
Add a pool for locked memory chunks, replacing LockedPageManager.

This is something I've been wanting to do for a long time. The current
approach of locking objects where they happen to be on the stack or heap
in-place causes a lot of mlock/munlock system call overhead, slowing
down any handling of keys.

Also locked memory is a limited resource on many operating systems (and
using a lot of it bogs down the system), so the previous approach of
locking every page that may contain any key information (but also other
information) is wasteful.
2016-10-27 13:17:25 +02:00