mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
fix: follow-up partial bitcoin/bitcoin#25063 - actually load binaries with x86_64-apple-darwin platform
This commit is contained in:
parent
007076d372
commit
fd2e9857aa
@ -15,5 +15,5 @@ export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
||||
export RUN_UNIT_TESTS="false"
|
||||
export GOAL="install"
|
||||
export TEST_PREVIOUS_RELEASES=true
|
||||
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0"
|
||||
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0 v20.0.1"
|
||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --disable-fuzz-binary LDFLAGS=-static-libstdc++"
|
||||
|
@ -30,11 +30,12 @@ from test_framework.util import (
|
||||
class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 6
|
||||
self.num_nodes = 7
|
||||
# Add new version after each release:
|
||||
self.extra_args = [
|
||||
[], # Pre-release: use to mine blocks
|
||||
["-nowallet"], # Pre-release: use to receive coins, swap wallets, etc
|
||||
["-nowallet"], # v20.0.1
|
||||
["-nowallet"], # v19.3.0
|
||||
["-nowallet"], # v18.2.2
|
||||
["-nowallet"], # v0.17.0.3
|
||||
@ -51,6 +52,7 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
None,
|
||||
None,
|
||||
19030000,
|
||||
19030000,
|
||||
18020200,
|
||||
170003,
|
||||
160101,
|
||||
@ -68,7 +70,8 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
res = self.nodes[self.num_nodes - 1].getblockchaininfo()
|
||||
assert_equal(res['blocks'], 101)
|
||||
|
||||
node_master = self.nodes[self.num_nodes - 5]
|
||||
node_master = self.nodes[self.num_nodes - 6]
|
||||
node_v20 = self.nodes[self.num_nodes - 5]
|
||||
node_v19 = self.nodes[self.num_nodes - 4]
|
||||
node_v18 = self.nodes[self.num_nodes - 3]
|
||||
node_v17 = self.nodes[self.num_nodes - 2]
|
||||
@ -117,6 +120,13 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
assert info['private_keys_enabled'] == False
|
||||
assert info['keypoolsize'] == 0
|
||||
|
||||
# w1_v20: regular wallet, created with v20.0
|
||||
node_v20.createwallet(wallet_name="w1_v20")
|
||||
wallet = node_v20.get_wallet_rpc("w1_v20")
|
||||
info = wallet.getwalletinfo()
|
||||
assert info['private_keys_enabled']
|
||||
assert info['keypoolsize'] > 0
|
||||
|
||||
# w2_v19: wallet with private keys disabled, created with v0.19
|
||||
node_v19.createwallet(wallet_name="w2_v19", disable_private_keys=True)
|
||||
wallet = node_v19.get_wallet_rpc("w2_v19")
|
||||
@ -155,6 +165,7 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
|
||||
# Copy the wallets to older nodes:
|
||||
node_master_wallets_dir = os.path.join(node_master.datadir, "regtest/wallets")
|
||||
node_v20_wallets_dir = os.path.join(node_v20.datadir, "regtest/wallets")
|
||||
node_v19_wallets_dir = os.path.join(node_v19.datadir, "regtest/wallets")
|
||||
node_v18_wallets_dir = os.path.join(node_v18.datadir, "regtest/wallets")
|
||||
node_v17_wallets_dir = os.path.join(node_v17.datadir, "regtest/wallets")
|
||||
@ -199,6 +210,34 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
os.path.join(node_v19_wallets_dir, wallet)
|
||||
)
|
||||
|
||||
# Copy wallets to v0.20
|
||||
for wallet in os.listdir(node_master_wallets_dir):
|
||||
shutil.copytree(
|
||||
os.path.join(node_master_wallets_dir, wallet),
|
||||
os.path.join(node_v20_wallets_dir, wallet)
|
||||
)
|
||||
|
||||
# Open the wallets in v0.20
|
||||
node_v20.loadwallet("w1")
|
||||
wallet = node_v20.get_wallet_rpc("w1")
|
||||
info = wallet.getwalletinfo()
|
||||
assert info['private_keys_enabled']
|
||||
assert info['keypoolsize'] > 0
|
||||
txs = wallet.listtransactions()
|
||||
assert_equal(len(txs), 1)
|
||||
|
||||
node_v20.loadwallet("w2")
|
||||
wallet = node_v20.get_wallet_rpc("w2")
|
||||
info = wallet.getwalletinfo()
|
||||
assert info['private_keys_enabled'] == False
|
||||
assert info['keypoolsize'] == 0
|
||||
|
||||
node_v20.loadwallet("w3")
|
||||
wallet = node_v20.get_wallet_rpc("w3")
|
||||
info = wallet.getwalletinfo()
|
||||
assert info['private_keys_enabled']
|
||||
assert info['keypoolsize'] == 0
|
||||
|
||||
# Open the wallets in v0.19
|
||||
node_v19.loadwallet("w1")
|
||||
wallet = node_v19.get_wallet_rpc("w1")
|
||||
@ -277,15 +316,15 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
# assert_raises_rpc_error(-4, "Wallet loading failed.", node_v17.loadwallet, 'w3_v18')
|
||||
|
||||
# Instead, we stop node and try to launch it with the wallet:
|
||||
self.stop_node(4)
|
||||
self.stop_node(5)
|
||||
# it expected to fail with error 'DBErrors::TOO_NEW' but Dash Core can open v18 by version 17
|
||||
# can be implemented in future if there's any incompatible versions
|
||||
#node_v17.assert_start_raises_init_error(["-wallet=w3_v18"], "Error: Error loading w3_v18: Wallet requires newer version of Dash Core")
|
||||
#node_v17.assert_start_raises_init_error(["-wallet=w3"], "Error: Error loading w3: Wallet requires newer version of Dash Core")
|
||||
self.start_node(4)
|
||||
self.start_node(5)
|
||||
|
||||
# Open most recent wallet in v0.16 (no loadwallet RPC)
|
||||
self.restart_node(5, extra_args=["-wallet=w2"])
|
||||
self.restart_node(6, extra_args=["-wallet=w2"])
|
||||
wallet = node_v16.get_wallet_rpc("w2")
|
||||
info = wallet.getwalletinfo()
|
||||
assert info['keypoolsize'] == 1
|
||||
|
@ -21,6 +21,18 @@ import hashlib
|
||||
|
||||
|
||||
SHA256_SUMS = {
|
||||
"d1f7121a7d7bdd4077709284076860389d6a0f4481a934ad9acb85cae3d7b83e": "dashcore-20.0.1-aarch64-linux-gnu.tar.gz",
|
||||
"37375229e5ab18d7050b729fb016df24acdd72d60bc3fa074270d89030a27827": "dashcore-20.0.1-arm-linux-gnueabihf.tar.gz",
|
||||
"ab530f72d2bfbfcd7fca0644e3ea5c5b279e2204fe50ff7bd9cc452a0d413c65": "dashcore-20.0.1-arm64-apple-darwin.dmg",
|
||||
"8f4b55e4a3d6bb38a0c1f51ece14f387fd4dcffa000aeecfbbd1f751da8b4446": "dashcore-20.0.1-arm64-apple-darwin.tar.gz",
|
||||
"1d9cdb00d93e8babe9f54d0ecb04c55f2cd6fd6cfaa85466aa7f95a6976d040d": "dashcore-20.0.1-riscv64-linux-gnu.tar.gz",
|
||||
"f722954c38d5b18f8290e41ca9dd833929258dcf68c9396cbbc81d241285947b": "dashcore-20.0.1-win64-setup.exe",
|
||||
"bb6d59a3eadac316e86e073a9f7ca4d28f3a2e8a59b7109d509a7368675a6f5f": "dashcore-20.0.1-win64.zip",
|
||||
"5373a84f49e4f76bd04987806f5fcde0b537fa1408e1f98370680f3f5134970f": "dashcore-20.0.1-x86_64-apple-darwin.dmg",
|
||||
"0c9344961ae5800f54ffc90af63826cdbf61acc5c442f3fab6527d528f2d9323": "dashcore-20.0.1-x86_64-apple-darwin.tar.gz",
|
||||
"7c82bdbd1c2de515d6c7245886d8c0b0044a4a9b6f74166b8d58c82cd4ae3270": "dashcore-20.0.1-x86_64-linux-gnu.tar.gz",
|
||||
"bb898a8e4c54fd5989f114673e1fee5116bf6ffa257c63397993035c390de806": "dashcore-20.0.1.tar.gz",
|
||||
#
|
||||
"a4b555b47f5f9a5a01fc5d3b543731088bd10a65dd7fa81fb552818146e424b5": "dashcore-19.3.0-aarch64-linux-gnu.tar.gz",
|
||||
"531bb188c1aea808ef6f3533d71182a51958136f6e43d9fcadaef1a5fcdd0468": "dashcore-19.3.0-osx.dmg",
|
||||
"1b4673a2bd71f9f2b593c2d71386e60f4744b59b57142707f0045ed49c92024b": "dashcore-19.3.0-osx64.tar.gz",
|
||||
|
Loading…
Reference in New Issue
Block a user