MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_bip86_vs_regular_p2tr

Function test_bip86_vs_regular_p2tr

tests/test_wallet.py:1887–1900  ·  view source on GitHub ↗

Test that BIP86 addresses are different from regular P2TR addresses

(node_factory)

Source from the content-addressed store, hash-verified

1885
1886@unittest.skipIf(TEST_NETWORK != 'regtest', "BIP86 tests are regtest-specific")
1887def test_bip86_vs_regular_p2tr(node_factory):
1888 """Test that BIP86 addresses are different from regular P2TR addresses"""
1889 l1 = setup_bip86_node(node_factory)
1890
1891 # Generate addresses of both types
1892 bip86_addr = l1.rpc.newaddr('p2tr')['p2tr']
1893 p2tr_addr = l1.rpc.newaddr('p2tr')['p2tr']
1894
1895 # They should be different
1896 assert bip86_addr != p2tr_addr, "BIP86 and regular P2TR addresses should be different"
1897
1898 # Both should be valid Taproot addresses (start with bcrt1p for regtest)
1899 assert bip86_addr.startswith('bcrt1p')
1900 assert p2tr_addr.startswith('bcrt1p')
1901
1902
1903@unittest.skipIf(TEST_NETWORK != 'regtest', "BIP86 tests are regtest-specific")

Callers

nothing calls this directly

Calls 2

setup_bip86_nodeFunction · 0.85
newaddrMethod · 0.45

Tested by

no test coverage detected