ElementsProject / ElementsProject/elements

getnewaddress generates invalid bech32 addresses in regtest

Aperta
#1,092 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
1.2k
Fork
416
Merge medio
1g 23h
PR unite (30g)
15

Descrizione

**Expected behavior**

When calling `getnewaddress` and then `getaddressinfo` on the newly generated address, it should work and return the address info, not an error.

**Actual behavior**

`getaddressinfo` returns:
```
error code: -5
error message:
Invalid address
```

but only for bech32 addresses and apparently only in `regtest` chain. Legacy and p2sh-segwit seems to work fine.

**To reproduce**

Just starts a fresh node in `regtest` mode, and type the 2 commands.

**System information**

Tried on 2 different machines with elements 0.18.1.7 and 0.18.1.12:
1. Linux sosthene01 5.13.0-28-generic # 31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
2. Linux sosthene02 5.13.0-27-generic # 29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.