Open quietnan opened 6 years ago
Looking at git-blame, it seems that the length is not wrong after copying from bitcoin, but after copying from Ixcoin, where it was also wrong already. There it should be "\x17Ixcoin Signed Message:\n", as 'Ixcoin' has one character less than 'Bitcoin'...
Same bug as feathercoin (https://github.com/Feathercoin-Foundation/electrum-ftc/issues/106). The first character of the magic message is the length of the magic string, which apparently was copied from Bitcoin. But 'Dogecoin' has one more character than 'Bitcoin'. Correspondingly, while electrum-doge works in itself, it would not be able to verify messages that were signed with dogecoin core or vice versa having dogecoin core verify messages that were signed with electrum-doge. This fix changes electrum-doge to the dogecoin core conventions, which unfortunately breaks compatibility with previous (wrong) electrum-doge versions.
The string "Dogecoin Signed Message:\n" is 25 bytes like Litecoin, not 24 bytes like Bitcoin.