Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
33f0c55f
Commit
33f0c55f
authored
Jan 13, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: `math/rand` -> `crypto/rand` per Semgrep
parent
4dd44c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
l2_batcher.go
op-e2e/actions/l2_batcher.go
+5
-3
No files found.
op-e2e/actions/l2_batcher.go
View file @
33f0c55f
...
@@ -4,9 +4,9 @@ import (
...
@@ -4,9 +4,9 @@ import (
"bytes"
"bytes"
"context"
"context"
"crypto/ecdsa"
"crypto/ecdsa"
"crypto/rand"
"io"
"io"
"math/big"
"math/big"
"math/rand"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core"
...
@@ -248,8 +248,10 @@ func (s *L2Batcher) ActL2BatchSubmitGarbage(t Testing, kind GarbageKind) {
...
@@ -248,8 +248,10 @@ func (s *L2Batcher) ActL2BatchSubmitGarbage(t Testing, kind GarbageKind) {
outputFrame
=
outputFrame
[
1
:
]
outputFrame
=
outputFrame
[
1
:
]
// Replace the output frame with random bytes of length [1, 512]
// Replace the output frame with random bytes of length [1, 512]
case
RANDOM
:
case
RANDOM
:
buf
:=
make
([]
byte
,
rand
.
Intn
(
512
)
+
1
)
i
,
err
:=
rand
.
Int
(
rand
.
Reader
,
big
.
NewInt
(
512
))
_
,
err
:=
rand
.
Read
(
buf
)
require
.
NoError
(
t
,
err
,
"error generating random bytes length"
)
buf
:=
make
([]
byte
,
i
.
Int64
()
+
1
)
_
,
err
=
rand
.
Read
(
buf
)
require
.
NoError
(
t
,
err
,
"error generating random bytes"
)
require
.
NoError
(
t
,
err
,
"error generating random bytes"
)
outputFrame
=
buf
outputFrame
=
buf
// Remove 4 bytes from the tail end of the output frame
// Remove 4 bytes from the tail end of the output frame
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment