mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
elements: Parametrize the sample addresses we test against
Since elements addresses look quite different from the bitcoin mainnet addresses I just added a sample to the chainparams fixture. In addition I extracted some of the fixed strings to reference chainparams instead. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
9e333f2416
commit
8a69ea7bf5
@@ -1512,12 +1512,12 @@ def test_newaddr(node_factory, chainparams):
|
||||
assert both['bech32'].startswith(chainparams['bip173_prefix'])
|
||||
|
||||
|
||||
def test_newaddr_deprecated(node_factory):
|
||||
def test_newaddr_deprecated(node_factory, chainparams):
|
||||
l1 = node_factory.get_node(options={'allow-deprecated-apis': True})
|
||||
p2sh = l1.rpc.newaddr('p2sh-segwit')
|
||||
assert p2sh['address'].startswith('2')
|
||||
assert p2sh['address'].startswith(chainparams['p2sh_prefix'])
|
||||
bech32 = l1.rpc.newaddr('bech32')
|
||||
assert bech32['address'].startswith('bcrt1')
|
||||
assert bech32['address'].startswith(chainparams['bip173_prefix'])
|
||||
|
||||
|
||||
def test_bitcoind_fail_first(node_factory, bitcoind, executor):
|
||||
|
||||
Reference in New Issue
Block a user