Skip to content

Commit

Permalink
Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Oct 7, 2023
1 parent b85117d commit 95c9f75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions changeset/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func encodeKVPair(pair *iavl.KVPair) ([]byte, error) {

offset := 1
keyLen := len(pair.Key)
fmt.Printf("keyLen: %d, offset: %d\n", keyLen, offset)
fmt.Printf("offset: %d\n", offset)

written := binary.PutUvarint(buf[offset:], uint64(keyLen))
offset += written
Expand All @@ -192,16 +192,16 @@ func encodeKVPair(pair *iavl.KVPair) ([]byte, error) {
}

offset += keyLen
fmt.Printf("offset: %d\n", offset)
fmt.Printf("keyLen: %d, offset: %d\n", keyLen, offset)

valueLen := len(pair.Value)
written = binary.PutUvarint(buf[offset:], uint64(valueLen))
offset += written
fmt.Printf("written: %d, offset: %d\n", written, offset)

offset += written
copy(buf[offset:], pair.Value)
offset += valueLen
fmt.Printf("offset: %d\n", offset)
fmt.Printf("valueLen: %d, offset: %d\n", valueLen, offset)

return buf, nil
}
Expand Down

0 comments on commit 95c9f75

Please sign in to comment.