Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Dec 5, 2024
1 parent f9c1308 commit cd0e846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aggsender/types/certificate_build_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
const (
EstimatedSizeBridgeExit = 250
EstimatedSizeClaim = 44000
byteArrayJsonSizeFactor = 1.5
byteArrayJSONSizeFactor = 1.5
)

// CertificateBuildParams is a struct that holds the parameters to build a certificate
Expand Down Expand Up @@ -86,13 +86,13 @@ func (c *CertificateBuildParams) EstimatedSize() uint {
sizeBridges := int(0)
for _, bridge := range c.Bridges {
sizeBridges += EstimatedSizeBridgeExit
sizeBridges += int(byteArrayJsonSizeFactor * float32(len(bridge.Metadata)))
sizeBridges += int(byteArrayJSONSizeFactor * float32(len(bridge.Metadata)))
}

sizeClaims := int(0)
for _, claim := range c.Claims {
sizeClaims += EstimatedSizeClaim
sizeClaims += int(byteArrayJsonSizeFactor * float32(len(claim.Metadata)))
sizeClaims += int(byteArrayJSONSizeFactor * float32(len(claim.Metadata)))
}
return uint(sizeBridges + sizeClaims)
}
Expand Down

0 comments on commit cd0e846

Please sign in to comment.