Closed SupunS closed 1 year ago
Merging #287 (7ad3854) into main (d5384d9) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #287 +/- ##
==========================================
+ Coverage 69.08% 69.10% +0.02%
==========================================
Files 14 14
Lines 7306 7311 +5
==========================================
+ Hits 5047 5052 +5
- Misses 1624 1627 +3
+ Partials 635 632 -3
Impacted Files | Coverage Δ | |
---|---|---|
encode.go | 80.64% <ø> (ø) |
|
array_debug.go | 54.16% <100.00%> (ø) |
|
basicarray.go | 53.55% <100.00%> (ø) |
|
map_debug.go | 55.50% <100.00%> (ø) |
|
storable.go | 68.18% <100.00%> (+2.60%) |
:arrow_up: |
storage.go | 79.30% <100.00%> (+0.52%) |
:arrow_up: |
array.go | 76.15% <0.00%> (-0.34%) |
:arrow_down: |
map.go | 71.78% <0.00%> (+0.10%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Oh I see. So reporting at the beginning of each slab is sufficient, and don't need to report for each storable?
Oh I see. So reporting at the beginning of each slab is sufficient, and don't need to report for each storable?
@SupunS Yes. Storables implemented by Cadence are elements in atree (leaf) slabs. Therefore, we don't need to meter storables if we meter slabs.
Work towards https://github.com/dapperlabs/cadence-private-issues/issues/64
Description
It can be useful to have a callback function that gets called during the encoding (e.g: https://github.com/dapperlabs/cadence-private-issues/issues/64), to keep track of the operation.
This PR adds a generic
Callback
field to theEncoder
, which wraps different callback functions. Users of the encoder can register callbacks when they create the encoder. For now, the callback only has one functionBeforeEncode
which is/should be invoked at the start of each value encoding.main
branchFiles changed
in the Github PR explorer