### Describe the issue Signmessage doesn't work on "segwit addresses" (what BIP141/BIP49 calls "P2WPKH-nested-in-P2SH"). ### Steps to reproduce On testnet (or on litecoin :)): 1. `NEW_ADDRESS=$(bitcoin-cli getnewaddress)` 2. `SEGWIT_ADDRESS=$(bitcoin-cli addwitnessaddress $NEW_ADDRESS)` 3. `bitcoin-cli signmessage $SEGWIT_ADDRESS "shiny"` ### Expected behaviour Signature is printed ### Actual behaviour ``` error code: -3 error message: Address does not refer to key ``` ### What version of bitcoin-core are you using? v0.14.1 self-compiled from github repo ### Machine specs: - OS: Linux - CPU: can reproduce on x86 and x64 CPUs