Commit Graph

16897 Commits

Author SHA1 Message Date
UdjinM6
bbd9b10d47
Refactor nonLockedTxsByInputs (#3178) 2019-10-29 21:37:54 +03:00
UdjinM6
64a913d6f9
Allow empty strings in protx update_registrar as an option to re-use current values (#3177)
* Allow empty strings in `protx update_registrar` as an option to re-use current values

* Update src/rpc/rpcevo.cpp

Co-Authored-By: Alexander Block <ablock84@gmail.com>
2019-10-29 21:37:39 +03:00
PastaPastaPasta
3c21d2577f Slightly adjust some README.md files (#3175)
Signed-off-by: Pasta <pasta@dashboost.org>
2019-10-29 21:37:18 +03:00
Alexander Block
10dd3c1ee0
Merge pull request #3174 from codablock/pr_netpy_fixes
Backport fixes for net.py test
2019-10-23 09:57:22 +02:00
Alexander Block
883fcbe8bd
Always run extended tests in Gitlab CI (#3173)
These require only ~4m more, which is fine in Gitlab as we don't have so
strict limits. This makes the cron job obsolete.
2019-10-23 09:56:55 +02:00
UdjinM6
a7492c1d3a Handle coin type via CCoinControl (#3172) 2019-10-23 09:56:44 +02:00
Alexander Block
5107582f25
Merge #11252: [P2P] When clearing addrman clear mapInfo and mapAddr. (#3171)
b86a42077 when clearing addrman clear mapInfo and mapAddr (Gregory Sanders)

Pull request description:

  Power failure on my machine resulted in a corrupted addrman that would hit bad assertions when trying to serialize the "cleared" addrman to disk: 6866b4912b/src/addrman.h (L320)

Tree-SHA512: 07ca8b6cbd88407e5f3f0dccb346ae31bd1392f4210b2d5c5647c853986bfec95cf70240b92bafdc61b90e452a5d8315962738d10c10c2b53fdabff10503d05a
2019-10-23 09:56:30 +02:00
Alexander Block
0d1a049059
Don't show individual messages for each TX when too many come in at once (#3170)
This avoids locking up the whole Desktop on some systems where messages
are sent through DBUS.

Instead of showing each message, we'll now consolidate all TXs into a single
message when more then 9 arrive at once (in 100ms).
2019-10-23 09:56:15 +02:00
Alexander Block
589c892506
Fix 2 more bottlenecks causing GUI lockups (#3169)
* Remove dataChanged call for ToAddress

This call is redundant since a long time already. It comes from a time
where there was no ToAddress column, but only a Description column which
also contained status information for coinbases. This is gone for a long
time already, so the ToAddress column has nothing included which might
change when confirmations change.

For the history:
34fa178243 splitted the Description column
into Type and ToAddress
e599246803 removed last traces of status from
the ToAddress column

* Avoid call to labelForAddress in formatTxToAddress

This speeds up sorting by address
2019-10-23 09:56:00 +02:00
UdjinM6
dfd6ee472a Actually update spent index on DisconnectBlock (#3167)
Fixes #3166
2019-10-23 09:55:44 +02:00
Alexander Block
3c818e95bc
Only track last seen time instead of first and last seen time (#3165)
This avoids timeouts on parts of the network
2019-10-23 09:55:06 +02:00
MarcoFalke
cf632029b9 Merge #12804: [tests] Fix intermittent rpc_net.py failure.
5a67c0524e [tests] Fix intermittent rpc_net.py failure. (John Newbery)

Pull request description:

  rpc_net.py would intermittently fail on Travis, probably
  due to assuming that two consecutive RPC calls were atomic.
  Fix this by trying the test up to three times and only failing
  if all three attempts fail.

  fixes #11778

Tree-SHA512: f2f5047e05114ad2110377e6221ce057680c240952971fb33863834587d2250896c6b697ba27eef739cd0ab23faf47dfae8cafadc9833cbfab5a6f7e36dae5e2
2019-10-22 15:36:49 +02:00
MarcoFalke
1d8eb903ad Merge #12545: test: Use wait_until to ensure ping goes out
0eb84f30d8 test: Use wait_until to ensure ping goes out (Ben Woosley)

Pull request description:

  Intermittent failure evident here:
  https://travis-ci.org/bitcoin/bitcoin/jobs/344021180

Tree-SHA512: 8d3cbc55563160390d3918eb0b22348990cd81ad35c0563033f19142cb43b86a150fecc7df2196209ba00aaa805c67285451e582f387f8dac22d5e44d54e8a0d
2019-10-22 15:35:42 +02:00
UdjinM6
df3dbe85b7
Wait for sporks to propagate in llmq-chainlocks.py before mining new blocks (#3168)
The bug was introduced in e5ebabeddd
2019-10-22 11:40:17 +03:00
Nathan Marley
8cbd63d9e8 Make HD wallet warning a bit more natural (#3164) 2019-10-22 11:39:13 +03:00
QuantumExplorer
001c4338bf Improved messaging for ip address errors (#3163) 2019-10-19 13:40:29 +03:00
UdjinM6
33d04ebf28
Disable move ctor/operator for CKeyHolder (#3162)
* Disable move ctor/operator for CKeyHolder

Also fixes these warnings:
```
In file included from dsnotificationinterface.cpp:12:
In file included from ./privatesend/privatesend-client.h:8:
./privatesend/privatesend-util.h:18:5: warning: explicitly defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]
    CKeyHolder(CKeyHolder&&) = default;
    ^
./privatesend/privatesend-util.h:13:17: note: move constructor of 'CKeyHolder' is implicitly deleted because field 'reserveKey' has a deleted move constructor
    CReserveKey reserveKey;
                ^
./wallet/wallet.h:1282:5: note: 'CReserveKey' has been explicitly marked deleted here
    CReserveKey(const CReserveKey&) = delete;
    ^
In file included from dsnotificationinterface.cpp:12:
In file included from ./privatesend/privatesend-client.h:8:
./privatesend/privatesend-util.h:19:17: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
    CKeyHolder& operator=(CKeyHolder&&) = default;
                ^
./privatesend/privatesend-util.h:13:17: note: move assignment operator of 'CKeyHolder' is implicitly deleted because field 'reserveKey' has a deleted move assignment operator
    CReserveKey reserveKey;
                ^
./wallet/wallet.h:1283:18: note: 'operator=' has been explicitly marked deleted here
    CReserveKey& operator=(const CReserveKey&) = delete;
                 ^
2 warnings generated.
```

* Slightly refactor `CKeyHolderStorage::AddKey()` to clarify that it's ptr and not the object itself that we are moving
2019-10-19 13:40:12 +03:00
UdjinM6
40ef0f76a5
Merge #17118: build: depends macOS: point --sysroot to SDK (#3161)
a0daea459cf4812fbdda9a7ead131a73f5856c09 [build] depends macOS: point --sysroot to SDK (Sjors Provoost)

Pull request description:

  Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS.

  Replaces #14352 (which doesn't work on Catalina).

ACKs for top commit:
  jonasschnelli:
    utACK a0daea459cf4812fbdda9a7ead131a73f5856c09

Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
2019-10-19 13:39:37 +03:00
Alexander Block
da2f503a48 Fix largest part of GUI lockups with large wallets (#3155)
* [Qt] make sure transaction table entry gets updated after bump

* Remove unnecessary tracking of IS lock count

* Track lockedByChainLocks in TransactionRecord

* Only update record when the TX was not ChainLocked before

* Emit dataChanged for CT_UPDATED transactions

* Use plain seconds since epoch comparison in TransactionFilterProxy::filterAcceptsRow

The QDateTime::operator< calls inside TransactionFilterProxy::filterAcceptsRow
turned out to be the slowest part in the UI when many TXs are inside
the wallet. DateRoleInt allows us to request the plain seconds since epoch
which we then use to compare against dateFrom/dateTo, which are also both
stored as seconds since epoch now.

* Don't invoke updateConfirmations directly and let pollBalanceChanged handle it

* Implement AddressTableModel::labelForDestination

This one avoids converting from string to CBitcoinAddress and calling
.Get() on the result.

* Also store CBitcoinAddress object and CTxDestination in TransactionRecord

This avoids frequent and slow conversion

* Use labelForDestination when possible

This avoids unnecessary conversions

* Don't set fForceCheckBalanceChanged to true when IS lock is received

We already do this through updateTransaction(), which is also called when
an IS lock is received for one of our own TXs.

* Only update lockedByChainLocks and lockedByInstantSend when a change is possible

lockedByChainLocks can never get back to false, so no need to re-check it.
Same with lockedByInstantSend, except when a ChainLock overrides it.

* Hold and update label in TransactionRecord

Instead of looking it up in data()

* Review suggestions

* Use proper columns in dataChanged call in updateAddressBook
2019-10-19 13:39:02 +03:00
Wladimir J. van der Laan
0f7d8f8983 Merge #17118: build: depends macOS: point --sysroot to SDK
a0daea459cf4812fbdda9a7ead131a73f5856c09 [build] depends macOS: point --sysroot to SDK (Sjors Provoost)

Pull request description:

  Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS.

  Replaces #14352 (which doesn't work on Catalina).

ACKs for top commit:
  jonasschnelli:
    utACK a0daea459cf4812fbdda9a7ead131a73f5856c09

Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
2019-10-17 14:57:47 +03:00
UdjinM6
3c6b5f98e0 Use wallet UTXOs whenever possible to avoid looping through all wallet txes (#3156)
* Use setWalletUTXO whenever possible to avoid looping through all wallet txes

* Apply review suggestion - GetSpendableTXs()
2019-10-17 12:28:34 +02:00
Alexander Block
21d33dd56d
Merge #14413: tests: Allow closed rpc handler in assert_start_raises_init_error (#3157)
62c304ea48 tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee)

Pull request description:

  The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable)

  See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server"

Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
2019-10-17 11:59:21 +02:00
Alexander Block
4db91c605b
Fix Gitlab cache issues (#3160)
* Make parent cache download quiet

This spammed logs quite a bit

* Add "-p" to "mkdir $CI_PROJECT_DIR/cache-artifact"

Otherwise the after_script is silently aborted when the dir already exists.

* Extract parent cache artifact in own directory and later delete it

Otherwise we end up having "testlogs" (and maybe other stuff) in the
project directory, which causes future failures.
2019-10-17 11:52:26 +02:00
UdjinM6
e9ed354822
Partially revert 3061 (#3150)
Turned out that this causes SelectCoinsMinConf to (unnecessary) lean towards selecting mempool txes which can cause "too long mempool chain" error even when there are more funds to spend.
2019-10-17 12:36:35 +03:00
UdjinM6
4b6af8f2c1
Few fixes related to SelectCoinsGroupedByAddresses (#3144)
* Fix cache usage in SelectCoinsGroupedByAddresses

* Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected

* MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
2019-10-17 12:36:18 +03:00
Alexander Block
859d60f818
Don't use $CACHE_DIR in after_script (#3159)
This variable is not available here.
2019-10-16 18:59:33 +02:00
Alexander Block
be127bc2ee Replace vecAskFor with a priority queue (#3147)
This avoids sorting before looping through it to figure out what to
request. The assumption that sorting would be cheap when vecAskFor is
already mostly sorted (only unsorted at the end) turned out to be false.
In reality, ~50% of CPU time was consumed by the sort when a lot of traffic
(thousands of TXs) happen.
2019-10-16 17:10:36 +03:00
Alexander Block
a13a9182d9 Add missing "notfound" and "getsporks" to messagemap (#3146) 2019-10-16 17:10:18 +03:00
Alexander Block
efd8d2c82b Avoid propagating InstantSend related old recovered sigs (#3145)
* More/better logging for InstantSend

* Implement CRecoveredSigsDb::TruncateRecoveredSig

* Truncate recovered sigs for ISLOCKs instead of completely removing them

This makes AlreadyHave() return true even when the recovered sig is deleted
locally. This avoids re-requesting and re-processing of old recovered sigs.

* Also truncate recovered sigs for freshly received ISLOCKs

* Fix comment
2019-10-16 17:10:06 +03:00
Alexander Block
24fee30513
Add support for Gitlab CI (#3149)
* Add .gitlab-ci.yml

* Use | instead of > for multiline commands

This honor new-lines and makes ; unnecessary

* Use ubuntu:bionic as base image

* Move cache initialization before apt-get installs

* Cache apt packages

* Move installation of wget and unzip up as we need it for the cache

* Prevent apt from deleting caches

* Collect test logs into artifact

* Make combine_logs.py always look for the template in the correct dir

* Move final cache stuff into after_script

* Reintroduce PYTHON_DEBUG=1, but only for .travis.yml

* Install jinja2 in Travis builder image

* Enable ChainLocks after quorums have been created

Creating 4 quorums causes a lot of blocks to be created and signed by
ChainLocks, which then causes timeouts later.

* Increase timeout in wallet-dump.py test

The first dumpwallet is quite slow sometimes, which then makes the
later called dumpwallet throw a wallet locked exception.
2019-10-16 11:48:46 +02:00
Alexander Block
b4e19f8dd5
Merge pull request #3153 from codablock/pr_rpc_stop
Backport fixes for "stop" RPC behavior
2019-10-16 01:19:22 +02:00
Alexander Block
17151daa2c Fix compilation 2019-10-14 13:45:14 +02:00
Wladimir J. van der Laan
fefe07003b Merge #14670: http: Fix HTTP server shutdown
28479f926f21f2a91bec5a06671c60e5b0c55532 qa: Test bitcond shutdown (João Barbosa)
8d3f46ec3938e2ba17654fecacd1d2629f9915fd http: Remove timeout to exit event loop (João Barbosa)
e98a9eede2fb48ff33a020acc888cbcd83e24bbf http: Remove unnecessary event_base_loopexit call (João Barbosa)
6b13580f4e3842c11abd9b8bee7255fb2472b6fe http: Unlisten sockets after all workers quit (João Barbosa)
18e968581697078c36a3c3818f8906cf134ccadd http: Send "Connection: close" header if shutdown is requested (João Barbosa)
02e1e4eff6cda0bfc24b455a7c1583394cbff6eb rpc: Add wait argument to stop (João Barbosa)

Pull request description:

  Fixes #11777. Reverts #11006. Replaces #13501.

  With this change the HTTP server will exit gracefully, meaning that all requests will finish processing and sending the response, even if this means to wait more than 2 seconds (current time allowed to exit the event loop).

  Another small change is that connections are accepted even when the server is stopping, but HTTP requests are rejected. This can be improved later, especially if chunked replies are implemented.

  Briefly, before this PR, this is the order or events when a request arrives (RPC `stop`):
   1. `bufferevent_disable(..., EV_READ)`
   2. `StartShutdown()`
   3. `evhttp_del_accept_socket(...)`
   4. `ThreadHTTP` terminates (event loop exits) because there are no active or pending events thanks to 1. and 3.
   5. client doesn't get the response thanks to 4.

  This can be verified by applying
  ```diff
       // Event loop will exit after current HTTP requests have been handled, so
       // this reply will get back to the client.
       StartShutdown();
  +    MilliSleep(2000);
       return "Bitcoin server stopping";
   }
  ```
  and checking the log output:
  ```
      Received a POST request for / from 127.0.0.1:62443
      ThreadRPCServer method=stop user=__cookie__
      Interrupting HTTP server
  **  Exited http event loop
      Interrupting HTTP RPC server
      Interrupting RPC
      tor: Thread interrupt
      Shutdown: In progress...
      torcontrol thread exit
      Stopping HTTP RPC server
      addcon thread exit
      opencon thread exit
      Unregistering HTTP handler for / (exactmatch 1)
      Unregistering HTTP handler for /wallet/ (exactmatch 0)
      Stopping RPC
      RPC stopped.
      Stopping HTTP server
      Waiting for HTTP worker threads to exit
      msghand thread exit
      net thread exit

      ... sleep 2 seconds ...

      Waiting for HTTP event thread to exit
      Stopped HTTP server
  ```

  For this reason point 3. is moved right after all HTTP workers quit. In that moment HTTP replies are queued in the event loop which keeps spinning util all connections are closed. In order to trigger the server side close with keep alive connections (implicit in HTTP/1.1) the header `Connection: close` is sent if shutdown was requested. This can be tested by
  ```
  bitcoind -regtest
  nc localhost 18443
  POST / HTTP/1.1
  Authorization: Basic ...
  Content-Type: application/json
  Content-Length: 44

  {"jsonrpc": "2.0","method":"stop","id":123}
  ```

  Summing up, this PR:
   - removes explicit event loop exit — event loop exits once there are no active or pending events
   - changes the moment the listening sockets are removed — explained above
   - sends header `Connection: close` on active requests when shutdown was requested which is relevant when it's a persistent connection (default in HTTP 1.1) — libevent is aware of this header and closes the connection gracefully
   - removes event loop explicit break after 2 seconds timeout

Tree-SHA512: 4dac1e86abe388697c1e2dedbf31fb36a394cfafe5e64eadbf6ed01d829542785a8c3b91d1ab680d3f03f912d14fc87176428041141441d25dcb6c98a1e069d8
2019-10-14 13:45:09 +02:00
Wladimir J. van der Laan
a8e49d33e0 Merge #11006: Improve shutdown process
793667a Improve shutdown process (João Barbosa)

Pull request description:

  Improve the shutdown time by not having to wait up to 2 seconds.

  Here is a comparison running `wallet.py` function tests before this PR:
  ```
  2017-08-08 03:25:20.881000 TestFramework (INFO): Initializing test directory /var/folders/1v/8_69hby54nj2k3n6fywt44x80000gn/T/testq_ramjjr
  2017-08-08 03:25:23.853000 TestFramework (INFO): Mining blocks...
  2017-08-08 03:25:24.132000 TestFramework (INFO): test getmemoryinfo
  2017-08-08 03:25:24.559000 TestFramework (INFO): test gettxout
  2017-08-08 03:25:59.858000 TestFramework (INFO): check -rescan
  2017-08-08 03:26:07.735000 TestFramework (INFO): check -reindex
  2017-08-08 03:26:15.751000 TestFramework (INFO): check -zapwallettxes=1
  2017-08-08 03:26:24.105000 TestFramework (INFO): check -zapwallettxes=2
  2017-08-08 03:26:36.694000 TestFramework (INFO): Stopping nodes
  2017-08-08 03:26:43.599000 TestFramework (INFO): Cleaning up
  2017-08-08 03:26:43.612000 TestFramework (INFO): Tests successful
  ```
  After:
  ```
  2017-08-08 03:24:04.319000 TestFramework (INFO): Initializing test directory /var/folders/1v/8_69hby54nj2k3n6fywt44x80000gn/T/testoqeyi50_
  2017-08-08 03:24:07.035000 TestFramework (INFO): Mining blocks...
  2017-08-08 03:24:07.317000 TestFramework (INFO): test getmemoryinfo
  2017-08-08 03:24:07.763000 TestFramework (INFO): test gettxout
  2017-08-08 03:24:25.715000 TestFramework (INFO): check -rescan
  2017-08-08 03:24:27.792000 TestFramework (INFO): check -reindex
  2017-08-08 03:24:29.797000 TestFramework (INFO): check -zapwallettxes=1
  2017-08-08 03:24:32.207000 TestFramework (INFO): check -zapwallettxes=2
  2017-08-08 03:24:36.812000 TestFramework (INFO): Stopping nodes
  2017-08-08 03:24:37.915000 TestFramework (INFO): Cleaning up
  2017-08-08 03:24:37.927000 TestFramework (INFO): Tests successful
  ```
  This largely improves the time spent in Travis (under evaluation).

Tree-SHA512: 023012fb3f8a380addf5995a4bf865862fed712cdd1a648d82a710e6566bc3bd34b6c49f9f06d6cc6bd81ca859da50d30d7f786c816e702549ab642e3476426f
2019-10-14 13:44:56 +02:00
Wladimir J. van der Laan
00cbfac3c8 Merge #12366: http: Join worker threads before deleting work queue
11e0151 http: Remove numThreads and ThreadCounter (Wladimir J. van der Laan)
f946654 http: Remove WaitExit from WorkQueue (Wladimir J. van der Laan)
b1c2370 http: Join worker threads before deleting work queue (Wladimir J. van der Laan)

Pull request description:

  This prevents a potential race condition if control flow ends up in
  `ShutdownHTTPServer` before the thread gets to `queue->Run()`,
  deleting the work queue while workers are still going to use it.

  Meant to fix #12362.

Tree-SHA512: 8108514aeee5b2067a3736ed028014b580d1cbf8530ac7682b8a23070133dfa1ca21db4358c9158ea57e8811e0551395b6cb769887876b9cfce067ee968d0642
2019-10-14 13:44:32 +02:00
Nathan Marley
1cbe280ada Qt: Remove old themes (#3141)
* Remove crownium files

* Remove trad theme files

* Remove drkblue theme files

* Remove light-retro theme files

* Remove old themes from optimize-pngs script

* Remove refs to old themes in Makefile.qt

* Remove more old theme file references

* Remove old themes from options dialog

* No need to care about themes for images and icons anymore

* Bring `trad` back

* Drop remaining `drkblue` references

Rename files that are actually used and drop no longer needed ones
2019-10-10 14:53:00 +03:00
UdjinM6
dcdf1f3a68
Some refactoring for spork related functionality in tests (#3137)
* Use `wait_until` in sporks.py

* Drop unused spork functions in `dip3-deterministicmns.py`

* Use `wait_until` in multikeysporks.py

* scripted-diff: Rename `*_test_spork_state` to `*_test_spork_value` in multikeysporks.py to better match actual functionality

-BEGIN VERIFY SCRIPT-
sed -i 's/_test_spork_state/_test_spork_value/g' test/functional/multikeysporks.py
-END VERIFY SCRIPT-
2019-10-10 14:52:35 +03:00
UdjinM6
4112414710
Introduce getprivatesendinfo and deprecate getpoolinfo (#3140)
* Introduce getprivatesendinfo and deprecate getpoolinfo

* s/ToJson/GetJsonInfo/

* s/queues/queue_size/

* Add TODO to explain `denomination` string convertion

* s/entries/entries_count/

* Use `CURRENCY_UNIT`

* Who needs safety belts after all
2019-10-09 19:48:53 +03:00
UdjinM6
152c10bc4b
Various fixes for mixing queues (#3138)
* Always check for expired queues on masternodes

* Check if a queue is too old or too far into the future

Instead of only checking that it's to old

* Check that no masternode can spam us with dsqs regardless of dsq readiness
2019-10-09 19:48:32 +03:00
UdjinM6
e0c56246f5
Fixes and refactorings related to using mnsync in tests (#3136)
* Drop `get_mnsync_status`, `wait_to_sync` and `sync_masternodes` and introduce `force_finish_mnsync` for MNs only

* Use `force_finish_mnsync` from util.py in dip3-deterministicmns.py and drop local unused functions

Also move the call, `force_finish_mnsync` should be called before `connect_nodes_bi`
2019-10-09 19:48:12 +03:00
Alexander Block
eb87ad255a
Merge pull request #3139 from codablock/pr_orphanhandling
Also handle/resolve orphan TXs when parents appear in a block
2019-10-09 10:12:33 +02:00
Alexander Block
a12b03e5ca Run orphan TX handling tests twice, once by resolving via mempool and once via block 2019-10-07 19:03:50 +02:00
Alexander Block
e762070242 Also handle/resolve orphan TXs when parents appear in a block 2019-10-07 19:03:50 +02:00
Alexander Block
7e257a4e6f Remove RBF related code 2019-10-07 18:37:08 +02:00
Pieter Wuille
e89844d605 Interrupt orphan processing after every transaction
This makes orphan processing work like handling getdata messages:
After every actual transaction validation attempt, interrupt
processing to deal with messages arriving from other peers.
2019-10-07 18:37:08 +02:00
Pieter Wuille
306d2366dc [MOVEONLY] Move processing of orphan queue to ProcessOrphanTx 2019-10-07 18:37:08 +02:00
Pieter Wuille
079f22af1a Simplify orphan processing in preparation for interruptibility 2019-10-07 18:37:08 +02:00
UdjinM6
47c7f421f7
Merge pull request #3127 from codablock/pr_backport_orphantx_tests
Backport orphan TX tests and dependent PRs
2019-10-07 17:48:35 +03:00
Alexander Block
30767ffc42 Remove unnecessary time imports 2019-10-03 17:05:10 +02:00
Wladimir J. van der Laan
8bcba5d4e1 Merge #8498: Near-Bugfix: Optimization: Minimize the number of times it is checked that no money...
4e955c5 Near-Bugfix: Reestablish consensus check removed in 8d7849b (Jorge Timón)
3e8c916 Introduce CheckInputsAndUpdateCoins static wrapper in txmempool.cpp (Jorge Timón)
832e074 Optimization: Minimize the number of times it is checked that no money is created (Jorge Timón)
3f0ee3e Proper indentation for CheckTxInputs and other minor fixes (Jorge Timón)

Pull request description:

  ...is created by individual transactions to 2 places (but call only once in each):

  - ConnectBlock ( before calculated fees per txs twice )
  - AcceptToMemoryPoolWorker ( before called CheckTxInputs 4 times and calculated
     fees per tx one extra time )

  Also call tx.GetValueOut() only once per call of CheckTxInputs (instead of 2)

  For more motivation:

  ~~https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L1493~~
  https://github.com/jtimon/bitcoin/compare/0.13-consensus-inputs...jtimon:0.13-consensus-inputs-comments

  EDIT: partially replaces #6445

  Near-Bugfix as pointed out in https://github.com/bitcoin/bitcoin/pull/8498#discussion_r124346132

Tree-SHA512: c71188e7c7c2425c9170ed7b803896755a92fd22f43b136eedaa6e554106696f0b10271d0ef0d0127c1eaafbc31d12eb19143df4f1b6882feecedf6ef05ea346
2019-10-03 17:05:00 +02:00