Commit Graph

8 Commits

Author SHA1 Message Date
Sjors Provoost 1e348bc55a
rpc: fix getblock(header) returns target for tip
A target field was added to the getblock and getblockheader RPC calls in bitcoin#31583, but it mistakingly always used the tip value.

Because regtest does not have difficulty adjustment, a test is added for mainnet instead.

Github-Pull: #33446
Rebased-From: bf7996cbc3
2025-09-24 10:09:25 -04:00
Sjors Provoost 4ec30d53ec
test: add block 2016 to mock mainnet
The next commit requires an additional mainnet block which changes the difficulty.

Also fix a few minor mistakes in the test (suite):
- rename the create_coinbase retarger_period argument to halving_period. Before bitcoin#31583 this was hardcoded for regtest where these values are the same.
- drop unused fees argument from mine helper

Finally the CPU miner instructions for generating the alternative mainnet chain are expanded.

Github-Pull: #33446
Rebased-From: 4c3c1f42cf
2025-09-24 10:09:04 -04:00
Sebastian Falbesoner 2118301d77 test: rename CBlockHeader `.hash` -> `.hash_hex` for consistency
Note that we unfortunately can't use a scripted diff here, as the
`.hash` symbol is also used for other instances (e.g. CInv).
2025-07-17 12:45:35 +02:00
Sebastian Falbesoner 8b09cc350a test: remove bare CBlockHeader `.rehash()`/`.calc_sha256()` calls
Since the previous commit, CBlockHeader/CBlock object calls to the
methods `.rehash()` and `.calc_sha256()` are effectively no-ops
if the returned value is not used, so we can just remove them.
2025-07-17 11:59:09 +02:00
Sebastian Falbesoner 9b3dce24a3 test: remove bare CTransaction `.rehash()`/`.calc_sha256()` calls
Since the previous commit, CTransaction object calls to the
methods `.rehash()` and `.calc_sha256()` are effectively no-ops
if the returned value is not used, so we can just remove them.
2025-06-09 17:28:24 +02:00
Antoine Poinsot a5f52cfcc4 qa: timelock coinbase transactions created in functional tests 2025-04-25 12:44:08 -04:00
Ava Chow c847dee148 test: remove legacy wallet functional tests
Removes all legacy wallet specific functional tests.

Also removes the --descriptor and --legacy-wallet options as these are
no longer necessary with the legacy wallet removed.
2025-04-23 12:10:30 -07:00
Sjors Provoost 4131f322ac
test: check difficulty adjustment using alternate mainnet 2025-01-22 12:31:46 +01:00