From 95c9f750ac16854480e911e5bd122c5016061987 Mon Sep 17 00:00:00 2001 From: yzang2019 Date: Fri, 6 Oct 2023 17:53:52 -0700 Subject: [PATCH] Add log --- changeset/export.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/changeset/export.go b/changeset/export.go index c00cea6..046504f 100644 --- a/changeset/export.go +++ b/changeset/export.go @@ -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 @@ -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 }