Skip to content

Commit

Permalink
tests: Add Taproot soft fork status to getblockchaininfo test
Browse files Browse the repository at this point in the history
This commit updates the `rpc_blockchain.py` functional test to include the Taproot soft fork status in the `getblockchaininfo` RPC call. The Taproot soft fork is defined using the BIP9 activation mechanism with specific start and timeout times. The test verifies that the Taproot soft fork is correctly reported as "defined" and not yet active.

Changes include:
- Adding Taproot soft fork details to the expected `softforks` field in the `getblockchaininfo` test.
- Ensuring the test checks for the correct status, start time, timeout, and activation state of the Taproot soft fork.

This update ensures that the `getblockchaininfo` RPC call accurately reflects the status of the Taproot soft fork, which is crucial for testing and validation purposes.

Refs #244
  • Loading branch information
gto90 committed Dec 15, 2024
1 parent cca171c commit 0bda8ec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,16 @@
"cinttypes": "cpp",
"typeindex": "cpp",
"ios": "cpp"
}
},
"cmake.ignoreCMakeListsMissing": true,
"boost-test-adapter-robaho.tests": [
{
"testExecutables": [
{
"glob": "**/*{_test,_test.exe}"
}
],
"debugConfig": "Test Config"
}
],
}
26 changes: 12 additions & 14 deletions test/functional/rpc_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,18 @@ def _test_getblockchaininfo(self):
'type': 'buried',
'active': False,
'height': 1000000 # due to easypow
}
# Taproot code was removed from getblockchaininfo for time being
# 'taproot': {
# 'type': 'bip9',
# 'bip9': {
# 'status': 'active',
# 'start_time': -1,
# 'timeout': 9223372036854775807,
# 'since': 0,
# 'min_activation_height': 0,
# },
# 'height': 0,
# 'active': True
# }
},
'taproot': {
'type': 'bip9',
'bip9': {
'status': 'defined',
'start_time': 4070908800,
'timeout': 4099766400,
'since': 0,
'min_activation_height': 0,
},
'active': False
}
})

def _test_getchaintxstats(self):
Expand Down

0 comments on commit 0bda8ec

Please sign in to comment.