fix Stringer interface for ShaHash.
http://golang.org/ref/spec#Method_sets for why this is necessary
This commit is contained in:
parent
14a1da417f
commit
7630a95724
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ var ErrHashStrSize = fmt.Errorf("Max hash length is %v chars", MaxHashStringSize
|
||||||
type ShaHash [HashSize]byte
|
type ShaHash [HashSize]byte
|
||||||
|
|
||||||
// String returns the ShaHash in the standard bitcoin big-endian form.
|
// String returns the ShaHash in the standard bitcoin big-endian form.
|
||||||
func (hash *ShaHash) String() string {
|
func (hash ShaHash) String() string {
|
||||||
hashstr := ""
|
hashstr := ""
|
||||||
for i := range hash {
|
for i := range hash {
|
||||||
hashstr += fmt.Sprintf("%02x", hash[HashSize-1-i])
|
hashstr += fmt.Sprintf("%02x", hash[HashSize-1-i])
|
||||||
|
|
Loading…
Reference in a new issue