Currently there is a single use of segwit_addr.encode, and zero uses of segwit_addr.decode in the codebase.
This adds a simple round-trip test of the implementation to avoid future regressions.
Currently there is a single use of segwit_addr.encode, and zero uses of segwit_addr.decode in the codebase.
This adds a simple round-trip test of the implementation to avoid future regressions.
A unit test for the test framework? Interesting. As we don't really have a determined place for these, this seems fine to me.
Theoretically it's cross-checking the 2 bech32 implementations, so it's kind of a test of Core too :)
Concept ACK, won't be tested if wallet is disabled.
99 | @@ -97,6 +100,13 @@ def get_balances(self, confirmed=True): 100 | else: 101 | return [self.nodes[i].getunconfirmedbalance() for i in range(4)] 102 | 103 | + # Quick test of python bech32 implementation 104 | + def test_python_bech32(self, addr): 105 | + hrp =addr[:4]
nit, space.
Concept ACK, simple but better than nothing :)