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

Function test_bip86_vs_regular_p2tr

tests/test_wallet.py:1888–1901  ·  view source on GitHub ↗

Test that BIP86 addresses are different from regular P2TR addresses

(node_factory)

Source from the content-addressed store, hash-verified

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