diff options
author | Andrew Chow <github@achow101.com> | 2022-11-18 11:32:49 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-11-18 11:33:10 -0500 |
commit | aeb395dcdbfe2b1a6c77ff218939a18afde3add9 (patch) | |
tree | 99b4c0206a822d0a7c46a70fdb3dc2ff3311ecef /test | |
parent | 256120d2da76e43c53a9fcc4e3a2333fd608a48b (diff) | |
parent | 6630a1e8448c633e4abaa8f5903f11cac6f433a7 (diff) | |
download | bitcoin-aeb395dcdbfe2b1a6c77ff218939a18afde3add9.tar.xz |
Merge bitcoin/bitcoin#25315: Add warning on first startup if free disk space is less than necessary
6630a1e8448c633e4abaa8f5903f11cac6f433a7 Add warning on first startup if free disk space is less than necessary (Ben Woosley)
Pull request description:
This reworks/revives https://github.com/bitcoin/bitcoin/pull/15848 to add a check for low disk space on first startup and issue a warning if disk space is below the expected space required to accommodate the blocks.
This PR was fashioned by a team of developers at the [bitcoin++](https://www.btcplusplus.dev/) conference workshop: "[Let's contribute to Bitcoin Core](https://sched.co/12P6Z)"
Fixes #15813
ACKs for top commit:
achow101:
ACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7
willcl-ark:
tACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7 rebased on master. Warning shows on first start but not on restart after some blocks have been downloaded.
aureleoules:
ACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7
pablomartin4btc:
re-ACK https://github.com/bitcoin/bitcoin/commit/6630a1e8448c633e4abaa8f5903f11cac6f433a7
hernanmarino:
ReACK https://github.com/bitcoin/bitcoin/commit/6630a1e8448c633e4abaa8f5903f11cac6f433a7
Tree-SHA512: 0f18acabdf2b514e96e2eea8f304960b952226b83dc91334cf7d1f6355ea2f257aaec0ee38d43ac36435385ecd918333d20657c35a8a7407e7cf2680ccb643bb
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p_dos_header_tree.py | 4 | ||||
-rwxr-xr-x | test/functional/wallet_crosschain.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/p2p_dos_header_tree.py b/test/functional/p2p_dos_header_tree.py index 7e26994511..1f904644fc 100755 --- a/test/functional/p2p_dos_header_tree.py +++ b/test/functional/p2p_dos_header_tree.py @@ -22,7 +22,7 @@ class RejectLowDifficultyHeadersTest(BitcoinTestFramework): self.setup_clean_chain = True self.chain = 'testnet3' # Use testnet chain because it has an early checkpoint self.num_nodes = 2 - self.extra_args = [["-minimumchainwork=0x0"], ["-minimumchainwork=0x0"]] + self.extra_args = [["-minimumchainwork=0x0", '-prune=550']] * self.num_nodes def add_options(self, parser): parser.add_argument( @@ -63,7 +63,7 @@ class RejectLowDifficultyHeadersTest(BitcoinTestFramework): self.log.info("Feed all fork headers (succeeds without checkpoint)") # On node 0 it succeeds because checkpoints are disabled - self.restart_node(0, extra_args=['-nocheckpoints', "-minimumchainwork=0x0"]) + self.restart_node(0, extra_args=['-nocheckpoints', "-minimumchainwork=0x0", '-prune=550']) peer_no_checkpoint = self.nodes[0].add_p2p_connection(P2PInterface()) peer_no_checkpoint.send_and_ping(msg_headers(self.headers_fork)) assert { diff --git a/test/functional/wallet_crosschain.py b/test/functional/wallet_crosschain.py index b6d0c87985..c0047542ed 100755 --- a/test/functional/wallet_crosschain.py +++ b/test/functional/wallet_crosschain.py @@ -21,7 +21,7 @@ class WalletCrossChain(BitcoinTestFramework): # Switch node 1 to testnet before starting it. self.nodes[1].chain = 'testnet3' - self.nodes[1].extra_args = ['-maxconnections=0'] # disable testnet sync + self.nodes[1].extra_args = ['-maxconnections=0', '-prune=550'] # disable testnet sync with open(self.nodes[1].bitcoinconf, 'r', encoding='utf8') as conf: conf_data = conf.read() with open (self.nodes[1].bitcoinconf, 'w', encoding='utf8') as conf: @@ -51,7 +51,7 @@ class WalletCrossChain(BitcoinTestFramework): if not self.options.descriptors: self.log.info("Override cross-chain wallet load protection") self.stop_nodes() - self.start_nodes([['-walletcrosschain']] * self.num_nodes) + self.start_nodes([['-walletcrosschain', '-prune=550']] * self.num_nodes) self.nodes[0].loadwallet(node1_wallet) self.nodes[1].loadwallet(node0_wallet) |