-
Notifications
You must be signed in to change notification settings - Fork 980
Closed
Labels
Description
Issue and Steps to Reproduce
running the deamon via ./lightningd/lightningd --network=regtest .... and trying to generate a new invoice generates an lnbc... Address, which represents a mainnet address, but should be a testnet (regtest has the same prefixes as testnet)
invoice 100000 test test
{ "payment_hash" : "c9e9b95c9deba0cba9847ff30b0cead422137635af0d149b39e573344014ba83", "expiry_time" : 1521402860, "expires_at" : 1521402860, "bolt11" : "lnbcrt1u1pd2adwupp5e85mjhyaawsvh2vy0leskr826s3pxa344ux3fxeeu4engsq5h2psdq8w3jhxaqcqpxng5gq29g8wp3sh68k3rvz4xdeuvj4sta2chj0e3cnfqgk7dh8ag4krc8hakrfc2hxqnp3kyz042k8wkvz8h3r4454kxs3447e3ky63cptcrwyg" }
newaddr returns a testnet address (prefix=2, correct):
{ "address" : "2NC4DbuCt1Pp4uuBVVP4nPA3ENHhwEEBJz1" }
but newaddr bech32 returns a mainnet address (prefix bc is wrong, should be tb)
{ "address" : "bcrt1qhqewah0pzawjck3aa82hcxzks7mc62xzfw2g0q" }
Trying to pay this invoice via a other lightning-c node works, but trying to pay it with lightningnetwork lnd fails correctly with unknown network
Also, other way round it works anyway: lightningnetwork lnd (also in regtest) generated correctly a lntb... invoice and lightning-c was able to pay it, even itself would generate mainnet invoices
pay lntb1m1pd2awsppp54q20f42rpuzapqpxl4l5a2vhrm89pth7rj0nv3fyqvkl89hc8myqdqqcqzysms67f23xktazlazsjdwvqv7j59c34q5vqp4gnmddpkmlwqpufecxf9ledyq0ma495wrak26nvq5qcg6lgw7zwfy5yq4w54ux7qay3tsqrg02mh
{ "payment_preimage" : "93bf9397e06d2206cd83eaebfc9813a543a14c3bf4e006ba0e5d363fd29cfc9e", "getroute_tries" : 2, "sendpay_tries" : 2 }
getinfo output
{ "id" : "02fd345ecb7f294033298305a40e4bb77d8fc5d777b6056e0de5ddb9540633581c", "port" : 10007, "address" :
[ ], "version" : "v0.5.2-2016-11-21-2350-g234d67da", "blockheight" : 330, "network" : "regtest" }
Reactions are currently unavailable