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
May 10, 2021
by
Martin Holst Swende
Committed by
GitHub
May 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go.mod: upgrade to github.com/holiman/uint256 v1.2.0 (#22745)
parent
f19a679b
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 {
...
@@ -52,8 +52,7 @@ func CalcDifficultyFrontierU256(time uint64, parent *types.Header) *big.Int {
- num = block.number
- num = block.number
*/
*/
pDiff
:=
uint256
.
NewInt
()
pDiff
,
_
:=
uint256
.
FromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
pDiff
.
SetFromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
adjust
:=
pDiff
.
Clone
()
adjust
:=
pDiff
.
Clone
()
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
...
@@ -96,8 +95,7 @@ func CalcDifficultyHomesteadU256(time uint64, parent *types.Header) *big.Int {
...
@@ -96,8 +95,7 @@ func CalcDifficultyHomesteadU256(time uint64, parent *types.Header) *big.Int {
- num = block.number
- num = block.number
*/
*/
pDiff
:=
uint256
.
NewInt
()
pDiff
,
_
:=
uint256
.
FromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
pDiff
.
SetFromBig
(
parent
.
Difficulty
)
// pDiff: pdiff
adjust
:=
pDiff
.
Clone
()
adjust
:=
pDiff
.
Clone
()
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
adjust
.
Rsh
(
adjust
,
difficultyBoundDivisor
)
// adjust: pDiff / 2048
...
...
core/vm/instructions_test.go
View file @
ae5fcdc6
...
@@ -568,11 +568,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
...
@@ -568,11 +568,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
env
.
interpreter
=
evmInterpreter
env
.
interpreter
=
evmInterpreter
mem
.
Resize
(
32
)
mem
.
Resize
(
32
)
pc
:=
uint64
(
0
)
pc
:=
uint64
(
0
)
start
:=
uint256
.
NewInt
(
)
start
:=
new
(
uint256
.
Int
)
bench
.
ResetTimer
()
bench
.
ResetTimer
()
for
i
:=
0
;
i
<
bench
.
N
;
i
++
{
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
})
opSha3
(
&
pc
,
evmInterpreter
,
&
ScopeContext
{
mem
,
stack
,
nil
})
}
}
}
}
...
...
core/vm/logger_test.go
View file @
ae5fcdc6
...
@@ -60,8 +60,8 @@ func TestStoreCapture(t *testing.T) {
...
@@ -60,8 +60,8 @@ func TestStoreCapture(t *testing.T) {
Contract
:
contract
,
Contract
:
contract
,
}
}
)
)
scope
.
Stack
.
push
(
uint256
.
NewInt
(
)
.
SetUint64
(
1
))
scope
.
Stack
.
push
(
uint256
.
NewInt
(
1
))
scope
.
Stack
.
push
(
uint256
.
NewInt
(
))
scope
.
Stack
.
push
(
new
(
uint256
.
Int
))
var
index
common
.
Hash
var
index
common
.
Hash
logger
.
CaptureState
(
env
,
0
,
SSTORE
,
0
,
0
,
scope
,
nil
,
0
,
nil
)
logger
.
CaptureState
(
env
,
0
,
SSTORE
,
0
,
0
,
scope
,
nil
,
0
,
nil
)
if
len
(
logger
.
storage
[
contract
.
Address
()])
==
0
{
if
len
(
logger
.
storage
[
contract
.
Address
()])
==
0
{
...
...
go.mod
View file @
ae5fcdc6
...
@@ -36,7 +36,7 @@ require (
...
@@ -36,7 +36,7 @@ require (
github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29
github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/holiman/bloomfilter/v2 v2.0.3
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/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88
github.com/influxdata/influxdb v1.8.3
github.com/influxdata/influxdb v1.8.3
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
...
...
go.sum
View file @
ae5fcdc6
...
@@ -212,6 +212,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ
...
@@ -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/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 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw=
github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
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/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 h1:bcAj8KroPf552TScjFPIakjH2/tdIrIH8F+cc4v4SRo=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo=
...
...
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