NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

`siac` fails to send SC with "Failed to parse destination address can't scan type: *types.UnlockHash" #2973

Closed jbrukh closed 6 years ago

jbrukh commented 6 years ago

BUG REPORT

Upon executing the following command, I get an error message.

siac wallet send siacoins 100SC 2f68ba31fd1aa85e9409d07ba655cec52662baa6c5fb3d1ce79ae5ba434369430f598ebf0c22

Stack Trace or error message

Failed to parse destination address can't scan type: *types.UnlockHash

Expected Behavior

To send siacoins and receive a transaction hash.

How to reproduce it (as minimally and precisely as possible)

Run the command above.

Environment

jbrukh commented 6 years ago

Temporary fix was to downgrade to 1.3.1.

lukechampine commented 6 years ago

Looks like this was broken by https://github.com/NebulousLabs/Sia/commit/057f5ec270888641945ba1f0eceab914f286c34f, which uses fmt.Sscan to load the address. types.UnlockHash doesn't implement the Scan interface, so it fails. We can fix this easily by either implementing the Scan interface or using LoadString instead of Sscan. I've done the former on the addr-scan branch if you want to build it from source right away.

jbrukh commented 6 years ago

Thank you Luke for taking a look and speedy reply!