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
67e7f61a
Unverified
Commit
67e7f61a
authored
May 17, 2021
by
Martin Holst Swende
Committed by
GitHub
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix failing tests (#22888)
This PR fixes two errors that regressed when EIP-1559 was merged.
parent
94451c27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
blockchain_test.go
core/blockchain_test.go
+2
-2
state_processor_test.go
core/state_processor_test.go
+17
-2
No files found.
core/blockchain_test.go
View file @
67e7f61a
...
@@ -1357,8 +1357,8 @@ func TestEIP155Transition(t *testing.T) {
...
@@ -1357,8 +1357,8 @@ func TestEIP155Transition(t *testing.T) {
}
}
})
})
_
,
err
:=
blockchain
.
InsertChain
(
blocks
)
_
,
err
:=
blockchain
.
InsertChain
(
blocks
)
if
err
!=
types
.
ErrInvalidChainId
{
if
have
,
want
:=
err
,
types
.
ErrInvalidChainId
;
!
errors
.
Is
(
have
,
want
)
{
t
.
Error
(
"expected error:"
,
types
.
ErrInvalidChainId
)
t
.
Error
f
(
"have %v, want %v"
,
have
,
want
)
}
}
}
}
...
...
core/state_processor_test.go
View file @
67e7f61a
...
@@ -39,7 +39,22 @@ import (
...
@@ -39,7 +39,22 @@ import (
// contain invalid transactions
// contain invalid transactions
func
TestStateProcessorErrors
(
t
*
testing
.
T
)
{
func
TestStateProcessorErrors
(
t
*
testing
.
T
)
{
var
(
var
(
signer
=
types
.
LatestSigner
(
params
.
TestChainConfig
)
config
=
&
params
.
ChainConfig
{
ChainID
:
big
.
NewInt
(
1
),
HomesteadBlock
:
big
.
NewInt
(
0
),
EIP150Block
:
big
.
NewInt
(
0
),
EIP155Block
:
big
.
NewInt
(
0
),
EIP158Block
:
big
.
NewInt
(
0
),
ByzantiumBlock
:
big
.
NewInt
(
0
),
ConstantinopleBlock
:
big
.
NewInt
(
0
),
PetersburgBlock
:
big
.
NewInt
(
0
),
IstanbulBlock
:
big
.
NewInt
(
0
),
MuirGlacierBlock
:
big
.
NewInt
(
0
),
BerlinBlock
:
big
.
NewInt
(
0
),
LondonBlock
:
big
.
NewInt
(
0
),
Ethash
:
new
(
params
.
EthashConfig
),
}
signer
=
types
.
LatestSigner
(
config
)
testKey
,
_
=
crypto
.
HexToECDSA
(
"b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291"
)
testKey
,
_
=
crypto
.
HexToECDSA
(
"b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291"
)
)
)
var
makeTx
=
func
(
nonce
uint64
,
to
common
.
Address
,
amount
*
big
.
Int
,
gasLimit
uint64
,
gasPrice
*
big
.
Int
,
data
[]
byte
)
*
types
.
Transaction
{
var
makeTx
=
func
(
nonce
uint64
,
to
common
.
Address
,
amount
*
big
.
Int
,
gasLimit
uint64
,
gasPrice
*
big
.
Int
,
data
[]
byte
)
*
types
.
Transaction
{
...
@@ -61,7 +76,7 @@ func TestStateProcessorErrors(t *testing.T) {
...
@@ -61,7 +76,7 @@ func TestStateProcessorErrors(t *testing.T) {
var
(
var
(
db
=
rawdb
.
NewMemoryDatabase
()
db
=
rawdb
.
NewMemoryDatabase
()
gspec
=
&
Genesis
{
gspec
=
&
Genesis
{
Config
:
params
.
TestChainC
onfig
,
Config
:
c
onfig
,
Alloc
:
GenesisAlloc
{
Alloc
:
GenesisAlloc
{
common
.
HexToAddress
(
"0x71562b71999873DB5b286dF957af199Ec94617F7"
)
:
GenesisAccount
{
common
.
HexToAddress
(
"0x71562b71999873DB5b286dF957af199Ec94617F7"
)
:
GenesisAccount
{
Balance
:
big
.
NewInt
(
1000000000000000000
),
// 1 ether
Balance
:
big
.
NewInt
(
1000000000000000000
),
// 1 ether
...
...
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