Skip to content

Commit e2afc3e

Browse files
committed
Merge branch 'bitcoin' into auxpow
2 parents 73a09c2 + 3c1f72a commit e2afc3e

File tree

7 files changed

+43
-43
lines changed

7 files changed

+43
-43
lines changed

cmake/minisketch.cmake

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ check_cxx_source_compiles_with_flags("
2828
)
2929

3030
add_library(minisketch_common INTERFACE)
31-
target_compile_definitions(minisketch_common INTERFACE
32-
DISABLE_DEFAULT_FIELDS
33-
ENABLE_FIELD_32
34-
)
3531
if(MSVC)
3632
target_compile_options(minisketch_common INTERFACE
3733
/wd4060
@@ -42,29 +38,6 @@ if(MSVC)
4238
)
4339
endif()
4440

45-
if(HAVE_CLMUL)
46-
add_library(minisketch_clmul OBJECT EXCLUDE_FROM_ALL
47-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_1byte.cpp
48-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_2bytes.cpp
49-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_3bytes.cpp
50-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_4bytes.cpp
51-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_5bytes.cpp
52-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_6bytes.cpp
53-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_7bytes.cpp
54-
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_8bytes.cpp
55-
)
56-
target_compile_definitions(minisketch_clmul PUBLIC HAVE_CLMUL)
57-
target_compile_options(minisketch_clmul PRIVATE ${CLMUL_CXXFLAGS})
58-
target_link_libraries(minisketch_clmul
59-
PRIVATE
60-
core_interface
61-
minisketch_common
62-
)
63-
set_target_properties(minisketch_clmul PROPERTIES
64-
EXPORT_COMPILE_COMMANDS OFF
65-
)
66-
endif()
67-
6841
add_library(minisketch STATIC EXCLUDE_FROM_ALL
6942
${PROJECT_SOURCE_DIR}/src/minisketch/src/minisketch.cpp
7043
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_1byte.cpp
@@ -77,8 +50,11 @@ add_library(minisketch STATIC EXCLUDE_FROM_ALL
7750
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_8bytes.cpp
7851
)
7952

80-
# Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/24058
81-
set_target_properties(minisketch PROPERTIES OPTIMIZE_DEPENDENCIES OFF)
53+
target_compile_definitions(minisketch
54+
PRIVATE
55+
DISABLE_DEFAULT_FIELDS
56+
ENABLE_FIELD_32
57+
)
8258

8359
target_include_directories(minisketch
8460
PUBLIC
@@ -89,9 +65,25 @@ target_link_libraries(minisketch
8965
PRIVATE
9066
core_interface
9167
minisketch_common
92-
$<TARGET_NAME_IF_EXISTS:minisketch_clmul>
9368
)
9469

9570
set_target_properties(minisketch PROPERTIES
9671
EXPORT_COMPILE_COMMANDS OFF
9772
)
73+
74+
if(HAVE_CLMUL)
75+
set(_minisketch_clmul_src
76+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_1byte.cpp
77+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_2bytes.cpp
78+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_3bytes.cpp
79+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_4bytes.cpp
80+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_5bytes.cpp
81+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_6bytes.cpp
82+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_7bytes.cpp
83+
${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_8bytes.cpp
84+
)
85+
target_sources(minisketch PRIVATE ${_minisketch_clmul_src})
86+
set_property(SOURCE ${_minisketch_clmul_src} PROPERTY COMPILE_OPTIONS ${CLMUL_CXXFLAGS})
87+
target_compile_definitions(minisketch PRIVATE HAVE_CLMUL)
88+
unset(_minisketch_clmul_src)
89+
endif()

depends/packages/native_libmultiprocess.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package=native_libmultiprocess
2-
$(package)_version=07c917f7ca910d66abc6d3873162fc9061704074
2+
$(package)_version=1954f7f65661d49e700c344eae0fc8092decf975
33
$(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive
44
$(package)_file_name=$($(package)_version).tar.gz
5-
$(package)_sha256_hash=ac9db311e3b22aac3c7b7b7b3f6b7fee5cf3043ebb3c3bf412049e8b17166de8
5+
$(package)_sha256_hash=fc014bd74727c1d5d30b396813685012c965d079244dd07b53bc1c75c610a2cb
66
$(package)_dependencies=native_capnp
77

88
define $(package)_config_cmds

doc/translation_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We use automated scripts to help extract translations in both Qt, and non-Qt sou
1818

1919
To automatically regenerate the `bitcoin_en.ts` file, run the following commands:
2020
```sh
21-
cmake --preset dev-mode -DWITH_USDT=OFF
21+
cmake --preset dev-mode -DWITH_USDT=OFF -DWITH_MULTIPROCESS=OFF
2222
cmake --build build_dev_mode --target translate
2323
```
2424

test/functional/p2p_orphan_handling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def test_parents_change(self):
771771
node.bumpmocktime(NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY)
772772
peer1.wait_for_getdata([int(parent_missing["txid"], 16)])
773773

774-
# Replace parent_peekaboo_AB so that is is a newly missing parent.
774+
# Replace parent_peekaboo_AB so that is a newly missing parent.
775775
# Then, replace the replacement so that it can be resubmitted.
776776
node.sendrawtransaction(tx_replacer_BC["hex"])
777777
assert tx_replacer_BC["txid"] in node.getrawmempool()

test/functional/test-shell.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ user inputs. Such environments include the Python3 command line interpreter or
2424

2525
## 2. Importing `TestShell` from the Bitcoin Core repository
2626

27-
We can import the `TestShell` by adding the path of the Bitcoin Core
27+
We can import the `TestShell` by adding the path of the configured Bitcoin Core
2828
`test_framework` module to the beginning of the PATH variable, and then
29-
importing the `TestShell` class from the `test_shell` sub-package.
29+
importing the `TestShell` class from the `test_shell` sub-package. Since
30+
the build system creates a copy of the `test_framework` module into a new `build/`
31+
directory along with the required configuration file, the path to the build copy
32+
must be used.
3033

3134
```
3235
>>> import sys
33-
>>> sys.path.insert(0, "/path/to/bitcoin/test/functional")
36+
>>> sys.path.insert(0, "/path/to/bitcoin/build/test/functional")
3437
>>> from test_framework.test_shell import TestShell
3538
```
3639

@@ -155,7 +158,7 @@ To prevent the logs from being removed after a shutdown, simply set the
155158
The following utility consolidates logs from the bitcoind nodes and the
156159
underlying `BitcoinTestFramework`:
157160

158-
* `/path/to/bitcoin/test/functional/combine_logs.py
161+
* `/path/to/bitcoin/build/test/functional/combine_logs.py
159162
'/path/to/bitcoin_func_test_XXXXXXX'`
160163

161164
## 6. Custom `TestShell` parameters
@@ -170,9 +173,9 @@ can be called after the TestShell is shut down.
170173
| Test parameter key | Default Value | Description |
171174
|---|---|---|
172175
| `bind_to_localhost_only` | `True` | Binds bitcoind P2P services to `127.0.0.1` if set to `True`.|
173-
| `cachedir` | `"/path/to/bitcoin/test/cache"` | Sets the bitcoind datadir directory. |
176+
| `cachedir` | `"/path/to/bitcoin/build/test/cache"` | Sets the bitcoind datadir directory. |
174177
| `chain` | `"regtest"` | Sets the chain-type for the underlying test bitcoind processes. |
175-
| `configfile` | `"/path/to/bitcoin/test/config.ini"` | Sets the location of the test framework config file. |
178+
| `configfile` | `"/path/to/bitcoin/build/test/config.ini"` | Sets the location of the test framework config file. |
176179
| `coveragedir` | `None` | Records bitcoind RPC test coverage into this directory if set. |
177180
| `loglevel` | `INFO` | Logs events at this level and higher. Can be set to `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL`. |
178181
| `nocleanup` | `False` | Cleans up temporary test directory if set to `True` during `shutdown`. |

test/functional/test_framework/test_shell.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def reset(self):
6161
print("Shutdown TestShell before resetting!")
6262
else:
6363
self.num_nodes = None
64-
super().__init__()
64+
dummy_testshell_file = pathlib.Path(__file__).absolute().parent.parent / "testshell_dummy.py"
65+
super().__init__(dummy_testshell_file)
6566

6667
instance = None
6768

@@ -74,8 +75,8 @@ def __new__(cls):
7475
# cache. Since TestShell is meant for interactive use, there is no concrete
7576
# test; passing a dummy name is fine though, as only the containing directory
7677
# is relevant for successful initialization.
77-
tests_directory = pathlib.Path(__file__).resolve().parent.parent
78-
TestShell.instance = TestShell.__TestShell(tests_directory / "testshell_dummy.py")
78+
dummy_testshell_file = pathlib.Path(__file__).absolute().parent.parent / "testshell_dummy.py"
79+
TestShell.instance = TestShell.__TestShell(dummy_testshell_file)
7980
TestShell.instance.running = False
8081
return TestShell.instance
8182

test/functional/wallet_abandonconflict.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def run_test(self):
4545
txB = alice.sendtoaddress(alice.getnewaddress(), Decimal("10"))
4646
txC = alice.sendtoaddress(alice.getnewaddress(), Decimal("10"))
4747
self.sync_mempools()
48+
49+
# Can not abandon transaction in mempool
50+
assert_raises_rpc_error(-5, 'Transaction not eligible for abandonment', lambda: alice.abandontransaction(txid=txA))
51+
4852
self.generate(self.nodes[1], 1)
4953

5054
# Can not abandon non-wallet transaction

0 commit comments

Comments
 (0)