File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 }
3333)
3434
35+ func SizeOf [B ~ []byte ](b B ) Size {
36+ return Size (len (b ))
37+ }
38+
3539func (b Size ) MarshalText () ([]byte , error ) {
3640 if b >= TByte {
3741 d := decimal .NewFromInt (int64 (b )).Div (decimal .NewFromInt (int64 (TByte )))
Original file line number Diff line number Diff line change @@ -91,12 +91,12 @@ var Default = Schema{
9191 TargetsLimit : Int (3 ),
9292 ReportSizeLimit : Size (config .KByte ),
9393 EVM : evmChainWrite {
94- TransactionGasLimit : Int ( - 1 ), //TODO
94+ TransactionGasLimit : Uint64 ( 500_000 ),
9595 },
9696 },
9797 ChainRead : chainRead {
9898 CallLimit : Int (3 ),
99- LogQueryBlockLimit : Int (100 ),
99+ LogQueryBlockLimit : Uint64 (100 ),
100100 PayloadSizeLimit : Size (5 * config .KByte ),
101101 },
102102 },
@@ -187,11 +187,11 @@ type chainWrite struct {
187187 EVM evmChainWrite
188188}
189189type evmChainWrite struct {
190- TransactionGasLimit Setting [int ] `unit:"{gas}"`
190+ TransactionGasLimit Setting [uint64 ] `unit:"{gas}"`
191191}
192192
193193type chainRead struct {
194- CallLimit Setting [int ] `unit:"{call}"`
195- LogQueryBlockLimit Setting [int ] `unit:"{block}"`
194+ CallLimit Setting [int ] `unit:"{call}"`
195+ LogQueryBlockLimit Setting [uint64 ] `unit:"{block}"`
196196 PayloadSizeLimit Setting [config.Size ]
197197}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ type ResourceLimiter[N Number] interface {
2424 Use (ctx context.Context , amount N ) error
2525 // Free is the counterpart to Use and releases amount of resources from use.
2626 Free (ctx context.Context , amount N ) error
27- // Available returns
27+ // Available returns the available remaining capacity.
2828 Available (ctx context.Context ) (N , error )
2929}
3030
You can’t perform that action at this time.
0 commit comments