mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 09:50:08 +01:00
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
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user