Skip to content

Commit fca0a9d

Browse files
authored
Merge pull request #176 from kcalvinalvin/2024-05-02-rename-tostring-to-string
blockchain, wire: rename ToString() to String()
2 parents 743c4f6 + 107896f commit fca0a9d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

blockchain/utreexoviewpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ func (b *BlockChain) VerifyUData(ud *wire.UData, txIns []*wire.TxIn, remember bo
960960
for i, txIn := range txIns {
961961
leafHash := ud.LeafDatas[i].LeafHash()
962962
str += fmt.Sprintf("txIn: %s, leafdata: %s, hash %s\n", txIn.PreviousOutPoint.String(),
963-
ud.LeafDatas[i].ToString(), hex.EncodeToString(leafHash[:]))
963+
ud.LeafDatas[i].String(), hex.EncodeToString(leafHash[:]))
964964
}
965965
str += fmt.Sprintf("err: %s", err.Error())
966966
return fmt.Errorf(str)

wire/leaf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ func (l *LeafData) LeafHash() [32]byte {
133133
return *(*[32]byte)(digest.Sum(nil))
134134
}
135135

136-
// ToString turns a LeafData into a string for logging.
137-
func (l *LeafData) ToString() (s string) {
136+
// String turns a LeafData into a string for logging.
137+
func (l *LeafData) String() (s string) {
138138
s += fmt.Sprintf("BlockHash:%s,", hex.EncodeToString(l.BlockHash[:]))
139139
s += fmt.Sprintf("OutPoint:%s,", l.OutPoint.String())
140140
s += fmt.Sprintf("Amount:%d,", l.Amount)

0 commit comments

Comments
 (0)