Closed silkroadnomad closed 6 years ago
The version bytes were for the regtest. I changed them to mainnet in 6e729ba71b72431400a2cdca5150c16f734ce162
I will implement a setting to switch between mainnet and regtest soon.
I'd like to reopen this issue, since I stumbled across this issue yesterday in "Confirm-dApp" again, look how I solved it:
https://github.com/Doichain/dapp/blob/0.0.2-hotfix/server/api/namecoin.js#L31
I guess I have to make some changes also in Send - dApp and Confirmation - dApp. This way we do not have to implement a switch, since this should originaly happen inside the blockchain.
changed it in places where it seems useful. left it the old way where it causes more work then before. don't know if we still need a RegTest switch for that and in which places.
After sending a new doi-in request via:
curl -X POST -H 'X-User-Id: xxxxx' -H 'X-Auth-Token: yyyyyy' -i 'http://x.x.x.x/api/v1/opt-in?recipient_mail=my-email@mydomain.com&seder_mail=info@doichain.org'
after a new block got successfully mined, we receive a
"Invalid address (aNpxxxxxxxx) [namecoin.firstUpdate.exception"
checking this address from the log via "namecoin-cli validateaddress" also results into a invalid address.
It seems like the algorythm for generating an address from the public key (from DNS txt entry doichain-opt-in-provider=example-domain.org) works differently in mainnet then in regtest.