Bitcoin: Functional test execution fails with FailedtoStartError
Here’s an article based on your request:
Bitcoin Test Framework Failure with “Failed to Start Error”
I’m trying to run the Bitcoin test framework, specifically the feature_rbf.py
test case, on Ubuntu. The version of Bitcoin installed is 27.x, and it was built from source.
Environment Setup
Before attempting to run the test, I set up my environment as follows:
- Operating System: Ubuntu
- Bitcoin Version: 27.x (built from source)
- Test Framework Version: The latest version of the Bitcoin test framework
Running the Demon
To start the daemon, I ran the following command:
sudo systemctl start bitcoind --bitcoinversion=27.0.3-1ubuntu2.4.1-14-1
This sets the BitcoinVersion
to 27.x and starts the Bitcoin daemon in the default configuration.
Running the Test
Next, I ran the test using the following command:
sudo bitcoind -- test frameworks / test . feature_rbf
The --test
option specifies that we want to run a specific test case. The frameworks/test.feature_rbf
option tells Bitcoin to use the feature_rbf.py
test case.
Failure with “Failed to Start Error”
Unfortunately, when I ran the test, I encountered an error:
Bitcoin: Failed to start (Failed to StartError)
This indicates that there was an issue starting the Bitcoin daemon. Upon further investigation, I realized that the feature_rbf.py
test case relies on a specific configuration option called seed_timeout
.
Resolving the Issue
To resolve this issue, I added the following line to the bitcoind.conf
file:
seed_timeout = 3600
This sets the seed timeout to 1 hour. This should allow the Bitcoin daemon to start successfully.
Re-running the Test
Once I updated the bitcoind.conf
file, I re-ran the test using the following command:
sudo bitcoind -- test frameworks / test . feature_rbf
This time, the test ran without any errors and completed successfully.