Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

../../api/rpc.go:557:36: cannot use tx.Txid (type string) as type []byte in argument to hex.EncodeToString #36

Open
pmitchev opened this issue Aug 9, 2018 · 3 comments

Comments

@pmitchev
Copy link

pmitchev commented Aug 9, 2018

x:spvwallet ob$ go version
go version go1.9.2 darwin/amd64
x:spvwallet ob$ make install
cd cmd/spvwallet && go install

github.com/OpenBazaar/spvwallet/api

../../api/rpc.go:557:36: cannot use tx.Txid (type string) as type []byte in argument to hex.EncodeToString
make: *** [install] Error 2

@pmitchev
Copy link
Author

pmitchev commented Aug 9, 2018

Same error on 1.10.3

@nodenow
Copy link

nodenow commented Aug 13, 2018

@pmitchev Ran into the same issue, using 1.10.1 and 1.9.1 . This bug baffles me for the following reasons

  • Travis Build succeeds (using 1.9)
  • File has not been edited in 10 months,

However, the error seems to indicate that we are trying to convert something to string that already is a string, so I just removed the call to hex.EncodeToString manually, and then it built successfully. Haven't kicked all the tires, but client seems to be running fine.

@pmitchev
Copy link
Author

Just change this line:
https://github.com/OpenBazaar/spvwallet/blob/master/api/rpc.go#L557

to this:
Txid: hex.EncodeToString([]byte(tx.Txid)),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants