Commit graph

26 commits

Author SHA1 Message Date
Byron Hambly
7878ba47b9 Merge c561f2f06e into merged_master (Bitcoin PR bitcoin/bitcoin#23497) 2023-06-19 09:28:31 +00:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Byron Hambly
77acfd01b8 Merge 205877e55f into merged_master (Bitcoin PR bitcoin/bitcoin#23546) 2023-06-01 08:23:12 +00:00
Byron Hambly
070c52dcef Merge b7e3600815 into merged_master (Bitcoin PR bitcoin/bitcoin#21526) 2023-04-23 10:59:59 +00:00
Russell Yanofsky
90fc8b089d Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
MarcoFalke
fa00447442
scripted-diff: Use clang-tidy syntax for C++ named arguments
-BEGIN VERIFY SCRIPT-
 perl -0777 -pi -e 's:((\(|\{|,)(\n| )*)\/\* ?([^=* ]+) ?\*\/ ?:\1/*\4=*/:g' $( git ls-files ./src/test ./src/wallet/test )
-END VERIFY SCRIPT-
2021-11-19 12:41:47 +01:00
Andrew Poelstra
40d1f3ffc5 Merge c0224bc962 into merged_master (Bitcoin PR bitcoin/bitcoin#22415) 2021-08-02 16:39:39 +00:00
James O'Beirne
9f6bb53935
validation: add chainman ref to CChainState
Add an upwards reference to chainstate instances to the owning
ChainstateManager. This is necessary because there are a number
of `this_chainstate == chainman.ActiveChainstate()` checks that
will happen (as a result of assumeutxo) in functions that otherwise
don't have an easily-accessible reference to the chainstate's
ChainManager.
2021-07-16 12:45:20 -04:00
James O'Beirne
4abf0779d6
refactor: no mempool arg to GetCoinsCacheSizeState
Unnecessary argument since we can make use of this->m_mempool

Co-authored-by: John Newbery <john@johnnewbery.com>
2021-07-13 11:16:30 -04:00
James O'Beirne
617661703a
validation: make CChainState::m_mempool optional
Since we now have multiple chainstate objects, only one of them is active at any given
time. An active chainstate has a mempool, but there's no point to others having one.

This change will simplify proposed assumeutxo semantics. See the discussion here:
https://github.com/bitcoin/bitcoin/pull/15606#pullrequestreview-692965905

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2021-07-13 11:11:35 -04:00
Andrew Poelstra
1670bdfa0b ci: fix benchmarks, fuzztests and unit tests
Includes a memory leak in the checkqueue unit test (but not in
the actual code). WE really need to switch our checkqueue to use
std::unique_pointer rather than bare pointers. But this would be
invasive enough that I want to do it in a followup PR.

Also pretty-much disable the validation_flush_cache unit test.
This is a stupid and irritating test which tries to unit-test
exact memory usage of std containers. It already has at least
one "remove wrong assumptions" update upstream and after many
tries I was unable to change all the magic numbers in a way
that'd consistently pass CI for Elements.

Also adds a couple ubsan suppressions about perfectly-legitimate
conversions of integer types.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
a0c37112ef Merge 5c910a6b7a into merged_master (Bitcoin PR #19826) 2020-11-28 17:34:40 +00:00
Andrew Poelstra
59aa4e1fba Merge ad2952d17a into merged_master (Bitcoin PR #19604) 2020-11-26 22:45:20 +00:00
Andrew Poelstra
12f11f8f70 Merge 2f71a1ea35 into merged_master (Bitcoin PR #18637) 2020-11-26 20:30:20 +00:00
Andrew Poelstra
f32fd217a5 Merge ec4d27fa8b into merged_master (Bitcoin PR #18216) 2020-11-26 01:08:40 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
873c33754d Merge ab9de43588 into merged_master (Bitcoin PR #18181) 2020-11-26 01:07:44 +00:00
Andrew Poelstra
3f3d6f9c98 Merge 2ed74a43a0 into merged_master (Bitcoin PR #16945) 2020-11-14 16:52:06 +00:00
MarcoFalke
fa0572d0f3
Pass mempool reference to chainstate constructor 2020-08-28 10:42:04 +02:00
MarcoFalke
fae8c28dae
Pass mempool pointer to GetCoinsCacheSizeState 2020-07-29 12:30:11 +02:00
James O'Beirne
f36aaa6392 Add CChainState::ResizeCoinsCaches
Also adds CCoinsViewCache::ReallocateCache() to attempt to free
memory that the cacheCoins's allocator may be hanging onto when
downsizing the cache.

Adds `CChainState::m_coins{tip,db}_cache_size_bytes` data members
so that we can reference cache size on a per-chainstate basis for
flushing.
2020-07-01 14:44:28 -04:00
Ben Woosley
df37377e30
test: Fix outstanding -Wsign-compare errors 2020-05-08 11:18:43 -07:00
MarcoFalke
fa488f131f
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04:00
MarcoFalke
faca8eff39
test: Remove incorrect assumptions in validation_flush_tests 2020-02-19 11:52:25 -08:00
James O'Beirne
02b9511d6b tests: add tests for GetCoinsCacheSizeState 2019-12-12 11:55:27 -05:00