lukechampine / user

A CLI renter for Sia
MIT License
12 stars 2 forks source link

Fix short hostkey lookup #15

Open lukechampine opened 4 years ago

lukechampine commented 4 years ago

This should work:

user scan 4074d1 1 1 1

But instead it returns:

Scan failed: could not lookup host: host announcement not found

This is because the scanHost function is calling ResolveHostKey on the truncated pubkey (4074d1). ResolveHostKey is only supposed to be used with full pubkeys. So at some point (either before scanHost or within it) we need to be calling LookupHost in order to turn the truncated pubkey into a full pubkey.