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
099e8e7f
Unverified
Commit
099e8e7f
authored
Apr 27, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mipsevm: clean up solutil test logging
parent
748773f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
solutil.go
mipsevm/solutil.go
+0
-1
solutil_test.go
mipsevm/solutil_test.go
+5
-2
No files found.
mipsevm/solutil.go
View file @
099e8e7f
...
@@ -158,7 +158,6 @@ func ParseSourceMap(sources []string, bytecode []byte, sourceMap string) (*Sourc
...
@@ -158,7 +158,6 @@ func ParseSourceMap(sources []string, bytecode []byte, sourceMap string) (*Sourc
if
instIndex
>=
len
(
instructions
)
{
if
instIndex
>=
len
(
instructions
)
{
// truncated source-map? Or some instruction that's longer than we accounted for?
// truncated source-map? Or some instruction that's longer than we accounted for?
// probably the contract-metadata bytes that are not accounted for in source map
// probably the contract-metadata bytes that are not accounted for in source map
fmt
.
Printf
(
"out of instructions: %d
\n
"
,
instIndex
-
len
(
instructions
))
}
else
{
}
else
{
instMapping
=
instructions
[
instIndex
]
instMapping
=
instructions
[
instIndex
]
}
}
...
...
mipsevm/solutil_test.go
View file @
099e8e7f
package
mipsevm
package
mipsevm
import
(
import
(
"
fmt
"
"
strings
"
"testing"
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
...
@@ -13,6 +13,9 @@ func TestSourcemap(t *testing.T) {
...
@@ -13,6 +13,9 @@ func TestSourcemap(t *testing.T) {
srcMap
,
err
:=
contract
.
SourceMap
([]
string
{
"../contracts/src/MIPS.sol"
})
srcMap
,
err
:=
contract
.
SourceMap
([]
string
{
"../contracts/src/MIPS.sol"
})
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
for
i
:=
0
;
i
<
len
(
contract
.
DeployedBytecode
.
Object
);
i
++
{
for
i
:=
0
;
i
<
len
(
contract
.
DeployedBytecode
.
Object
);
i
++
{
fmt
.
Println
(
srcMap
.
FormattedInfo
(
uint64
(
i
))
+
": test"
)
info
:=
srcMap
.
FormattedInfo
(
uint64
(
i
))
if
!
strings
.
HasPrefix
(
info
,
"generated:"
)
&&
!
strings
.
HasPrefix
(
info
,
"../contracts/src/MIPS.sol"
)
{
t
.
Fatalf
(
"unexpected info: %q"
,
info
)
}
}
}
}
}
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