fix Stringer interface for ShaHash.

http://golang.org/ref/spec#Method_sets for why this is necessary
This commit is contained in:
mischief 2013-05-29 11:51:13 -07:00
parent 14a1da417f
commit 7630a95724

View File

@ -21,7 +21,7 @@ var ErrHashStrSize = fmt.Errorf("Max hash length is %v chars", MaxHashStringSize
type ShaHash [HashSize]byte
// String returns the ShaHash in the standard bitcoin big-endian form.
func (hash *ShaHash) String() string {
func (hash ShaHash) String() string {
hashstr := ""
for i := range hash {
hashstr += fmt.Sprintf("%02x", hash[HashSize-1-i])