diff --git a/blockchain/utreexoviewpoint.go b/blockchain/utreexoviewpoint.go index dbaa9c7d..447b6c40 100644 --- a/blockchain/utreexoviewpoint.go +++ b/blockchain/utreexoviewpoint.go @@ -960,7 +960,7 @@ func (b *BlockChain) VerifyUData(ud *wire.UData, txIns []*wire.TxIn, remember bo for i, txIn := range txIns { leafHash := ud.LeafDatas[i].LeafHash() str += fmt.Sprintf("txIn: %s, leafdata: %s, hash %s\n", txIn.PreviousOutPoint.String(), - ud.LeafDatas[i].ToString(), hex.EncodeToString(leafHash[:])) + ud.LeafDatas[i].String(), hex.EncodeToString(leafHash[:])) } str += fmt.Sprintf("err: %s", err.Error()) return fmt.Errorf(str) diff --git a/wire/leaf.go b/wire/leaf.go index 5a2c9907..40587e9a 100644 --- a/wire/leaf.go +++ b/wire/leaf.go @@ -133,8 +133,8 @@ func (l *LeafData) LeafHash() [32]byte { return *(*[32]byte)(digest.Sum(nil)) } -// ToString turns a LeafData into a string for logging. -func (l *LeafData) ToString() (s string) { +// String turns a LeafData into a string for logging. +func (l *LeafData) String() (s string) { s += fmt.Sprintf("BlockHash:%s,", hex.EncodeToString(l.BlockHash[:])) s += fmt.Sprintf("OutPoint:%s,", l.OutPoint.String()) s += fmt.Sprintf("Amount:%d,", l.Amount)