@@ -13,11 +13,6 @@ import (
13
13
"github.com/evstack/ev-node/core/da"
14
14
)
15
15
16
- const (
17
- // DefaultMaxBlobSize is the default maximum blob size in bytes.
18
- DefaultMaxBlobSize = 1.5 * 1024 * 1024 // 1.5MB
19
- )
20
-
21
16
//go:generate mockgen -destination=mocks/api.go -package=mocks . Module
22
17
type Module interface {
23
18
da.DA
@@ -227,16 +222,16 @@ func (c *Client) Close() {
227
222
228
223
// NewClient creates a new Client with one connection per namespace with the
229
224
// given token as the authorization token.
230
- func NewClient (ctx context.Context , logger zerolog.Logger , addr , token string , gasPrice , gasMultiplier float64 ) (* Client , error ) {
225
+ func NewClient (ctx context.Context , logger zerolog.Logger , addr , token string , gasPrice , gasMultiplier float64 , maxBlobSize uint64 ) (* Client , error ) {
231
226
authHeader := http.Header {"Authorization" : []string {fmt .Sprintf ("Bearer %s" , token )}}
232
- return newClient (ctx , logger , addr , authHeader , gasPrice , gasMultiplier )
227
+ return newClient (ctx , logger , addr , authHeader , gasPrice , gasMultiplier , maxBlobSize )
233
228
}
234
229
235
- func newClient (ctx context.Context , logger zerolog.Logger , addr string , authHeader http.Header , gasPrice , gasMultiplier float64 ) (* Client , error ) {
230
+ func newClient (ctx context.Context , logger zerolog.Logger , addr string , authHeader http.Header , gasPrice , gasMultiplier float64 , maxBlobSize uint64 ) (* Client , error ) {
236
231
var multiCloser multiClientCloser
237
232
var client Client
238
233
client .DA .Logger = logger
239
- client .DA .MaxBlobSize = uint64 ( DefaultMaxBlobSize )
234
+ client .DA .MaxBlobSize = maxBlobSize
240
235
client .DA .gasPrice = gasPrice
241
236
client .DA .gasMultiplier = gasMultiplier
242
237
0 commit comments