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

Function test_newaddr

tests/test_misc.py:2258–2266  ·  view source on GitHub ↗
(node_factory, chainparams)

Source from the content-addressed store, hash-verified

2256
2257
2258def test_newaddr(node_factory, chainparams):
2259 l1 = node_factory.get_node()
2260 bech32 = l1.rpc.newaddr('bech32')
2261 assert 'p2sh-segwit' not in bech32
2262 assert bech32['bech32'].startswith(chainparams['bip173_prefix'])
2263 both = l1.rpc.newaddr('all')
2264 assert 'p2sh-segwit' not in both
2265 assert both['bech32'].startswith(chainparams['bip173_prefix'])
2266 assert both['p2tr'].startswith(chainparams['bip173_prefix'])
2267
2268
2269def test_bitcoind_fail_first(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 2

get_nodeMethod · 0.45
newaddrMethod · 0.45

Tested by

no test coverage detected