Skip to content

Commit 236f3af

Browse files
authored
fix failed when get interface size, need to marshal first: (#1199)
1 parent fbdb04c commit 236f3af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/storage/batchReceipt.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package storage
22

33
import (
4+
"encoding/json"
45
"sync"
56

67
"github.com/zoobc/zoobc-core/common/blocker"
@@ -93,7 +94,9 @@ func (brs *BatchReceiptCacheStorage) RemoveItem(_ interface{}) error {
9394
func (brs *BatchReceiptCacheStorage) size() int {
9495
var size int
9596
for _, cache := range brs.receipts {
96-
size += cache.XXX_Size()
97+
s, _ := json.Marshal(cache)
98+
size += len(s)
99+
97100
}
98101
return size
99102
}

0 commit comments

Comments
 (0)