Roasbeef / btcd

An alternative full node bitcoin implementation written in Go (golang)
ISC License
71 stars 29 forks source link

BOLT11 prefix in regtest network #19

Closed vapopov closed 6 years ago

vapopov commented 6 years ago

Initially was observed in lnd project for this issue https://github.com/lightningnetwork/lnd/issues/882

if to try to generate invoice for regtest net, we get encoded invoice with wrong prefix in human readable part

DanielWeigl commented 6 years ago

According to https://github.com/bitcoin/bitcoin/issues/12314 the prefix should be bcrt (bitcoin regtest) and not rt

vapopov commented 6 years ago

@DanielWeigl I was trying to find this mention in official document here https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#cite_ref-7-0 its not strictly defined thats why each project name it differently

Also saw your conversation here https://github.com/ElementsProject/lightning/issues/1241#issuecomment-374202553 , so was changed to bcrt

DanielWeigl commented 6 years ago

Yes, i was initially confused too - i did not know 4-lettered chain ids are valid. I also made this pull request to the bolt repo, to make it more clear: https://github.com/lightningnetwork/lightning-rfc/pull/397

halseth commented 6 years ago

LGTM! 💯

vapopov commented 6 years ago

cc @Roasbeef

vapopov commented 6 years ago

@Roasbeef ping :)