Add testnet4 network support (Bitcoin Core 28.0+)#111
Open
al-munazzim wants to merge 2 commits intodiybitcoinhardware:developfrom
Open
Add testnet4 network support (Bitcoin Core 28.0+)#111al-munazzim wants to merge 2 commits intodiybitcoinhardware:developfrom
al-munazzim wants to merge 2 commits intodiybitcoinhardware:developfrom
Conversation
- Add testnet4 to NETWORKS with same params as testnet3 - Add get_network() helper with testnet4 fallback - testnet4 uses identical address parameters (bech32 'tb', tpub/tprv) - Only Bitcoin networks modified; Liquid inherits via NETWORKS.update() - Add comprehensive tests for network definitions Fixes diybitcoinhardware#108
- Run tests on Python 3.9-3.12 - Experimental MicroPython Unix port testing - Triggers on push/PR to master and develop branches - Updated test_networks.py to use MicroPython-compatible unittest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bitcoin Core 28.0 introduces testnet4 as the replacement for testnet3. This PR adds support for the new network.
Changes
testnet4toNETWORKSwith same address parameters as testnet3 (bech32tb, tpub/tprv, coin_type 1)get_network()helper function with testnet4 fallbacksrc/embit/networks.py); Liquid inherits viaNETWORKS.update()Testing
All 7 tests pass:
get_network()works for direct lookup, testnet4, and returns None for unknownReferences
Fixes #108
Recreated from #109 against develop branch per maintainer feedback.