Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
ae5fcdc6
Unverified
Commit
ae5fcdc6
authored
4 years ago
by
Martin Holst Swende
Committed by
GitHub
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go.mod: upgrade to github.com/holiman/uint256 v1.2.0 (#22745)
parent
f19a679b
master
v1.10.12
v1.10.12-modified
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
difficulty.go
consensus/ethash/difficulty.go
+2
-4
instructions_test.go
core/vm/instructions_test.go
+2
-2
logger_test.go
core/vm/logger_test.go
+2
-2
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-0
No files found.
consensus/ethash/difficulty.go
View file @
ae5fcdc6
...
...
@@ -52,8 +52,7 @@ func CalcDifficultyFrontierU256(time uint64, parent *types.Header) *big.Int {
- num = block.number
*/
pDiff
:=
uint256
.
NewInt
()
pDiff
.
SetFromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
pDiff
,
_
:=
uint256
.
FromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
adjust
:=
pDiff
.
Clone
()
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
...
...
@@ -96,8 +95,7 @@ func CalcDifficultyHomesteadU256(time uint64, parent *types.Header) *big.Int {
- num = block.number
*/
pDiff
:=
uint256
.
NewInt
()
pDiff
.
SetFromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
pDiff
,
_
:=
uint256
.
FromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
adjust
:=
pDiff
.
Clone
()
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
...
...
This diff is collapsed.
Click to expand it.
core/vm/instructions_test.go
View file @
ae5fcdc6
...
...
@@ -568,11 +568,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
env
.
interpreter
=
evmInterpreter
mem
.
Resize
(
32
)
pc
:=
uint64
(
0
)
start
:=
uint256
.
NewInt
(
)
start
:=
new
(
uint256
.
Int
)
bench
.
ResetTimer
()
for
i
:=
0
;
i
<
bench
.
N
;
i
++
{
stack
.
pushN
(
*
uint256
.
NewInt
(
)
.
SetUint64
(
32
),
*
start
)
stack
.
pushN
(
*
uint256
.
NewInt
(
32
),
*
start
)
opSha3
(
&
pc
,
evmInterpreter
,
&
ScopeContext
{
mem
,
stack
,
nil
})
}
}
...
...
This diff is collapsed.
Click to expand it.
core/vm/logger_test.go
View file @
ae5fcdc6
...
...
@@ -60,8 +60,8 @@ func TestStoreCapture(t *testing.T) {
Contract
:
contract
,
}
)
scope
.
Stack
.
push
(
uint256
.
NewInt
(
)
.
SetUint64
(
1
))
scope
.
Stack
.
push
(
uint256
.
NewInt
(
))
scope
.
Stack
.
push
(
uint256
.
NewInt
(
1
))
scope
.
Stack
.
push
(
new
(
uint256
.
Int
))
var
index
common
.
Hash
logger
.
CaptureState
(
env
,
0
,
SSTORE
,
0
,
0
,
scope
,
nil
,
0
,
nil
)
if
len
(
logger
.
storage
[
contract
.
Address
()])
==
0
{
...
...
This diff is collapsed.
Click to expand it.
go.mod
View file @
ae5fcdc6
...
...
@@ -36,7 +36,7 @@ require (
github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/holiman/bloomfilter/v2 v2.0.3
github.com/holiman/uint256 v1.
1.1
github.com/holiman/uint256 v1.
2.0
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88
github.com/influxdata/influxdb v1.8.3
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
...
...
This diff is collapsed.
Click to expand it.
go.sum
View file @
ae5fcdc6
...
...
@@ -212,6 +212,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw=
github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM=
github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88 h1:bcAj8KroPf552TScjFPIakjH2/tdIrIH8F+cc4v4SRo=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo=
...
...
This diff is collapsed.
Click to expand it.
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