-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade geth to 1.13 #2416
Upgrade geth to 1.13 #2416
Changes from 2 commits
640951a
6a6304f
dcda316
5454e4f
80b06f9
3cbc555
6e09afc
2a952ba
24f5511
caf227c
1a40752
c2f3a8b
297dfcd
29c2d95
74605c8
2d1dde4
4161ef5
16ec667
60bd563
95c5128
c802d1a
65d2116
f3f4dd6
4b954b8
7be51c6
c45c453
f458ffe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -119,7 +119,7 @@ func NewEmbeddedBackendWithConfig(ctx context.Context, t *testing.T, config *par | |||||||||||||||
embedded.ethBackend.SetEtherbase(acct.Address) | ||||||||||||||||
|
||||||||||||||||
embedded.ethBackend.TxPool().SetGasPrice(big.NewInt(0)) | ||||||||||||||||
err = embedded.ethBackend.APIBackend.StartMining(0) | ||||||||||||||||
err = embedded.ethBackend.APIBackend.StartMining() | ||||||||||||||||
assert.Nil(t, err) | ||||||||||||||||
|
||||||||||||||||
// add debugger for node stop | ||||||||||||||||
|
@@ -139,7 +139,7 @@ func NewEmbeddedBackendWithConfig(ctx context.Context, t *testing.T, config *par | |||||||||||||||
if embedded.ethBackend.IsMining() { | ||||||||||||||||
cancelMiningCtx() | ||||||||||||||||
} else { | ||||||||||||||||
_ = embedded.ethBackend.APIBackend.StartMining(0) | ||||||||||||||||
_ = embedded.ethBackend.APIBackend.StartMining() | ||||||||||||||||
} | ||||||||||||||||
}, time.Millisecond*50) | ||||||||||||||||
|
||||||||||||||||
|
@@ -182,7 +182,7 @@ func (f *Backend) Signer() types.Signer { | |||||||||||||||
latestBlock, err := f.BlockByNumber(f.Context(), nil) | ||||||||||||||||
assert.Nil(f.T(), err) | ||||||||||||||||
|
||||||||||||||||
return types.MakeSigner(f.ChainConfig(), latestBlock.Number()) | ||||||||||||||||
return types.MakeSigner(f.ChainConfig(), latestBlock.Number(), latestBlock.Time()) | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure the latest block is successfully retrieved before using it. - latestBlock, err := f.BlockByNumber(f.Context(), nil)
- return types.MakeSigner(f.ChainConfig(), latestBlock.Number(), latestBlock.Time())
+ latestBlock, err := f.BlockByNumber(f.Context(), nil)
+ if err != nil {
+ f.T().Error("Failed to retrieve latest block: ", err)
+ return nil
+ }
+ return types.MakeSigner(f.ChainConfig(), latestBlock.Number(), latestBlock.Time()) Committable suggestion
Suggested change
|
||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// GethBackendName is the name of the geth backend. | ||||||||||||||||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle potential failure from
StartMining
in the retry logic.Committable suggestion