Skip to content

Commit

Permalink
eth, miner: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed Sep 20, 2022
1 parent 5879b81 commit 0fe45c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update beacon.ForkchoiceStateV1, pa
return valid(nil), beacon.InvalidPayloadAttributes.With(err)
}
// Send a request to generate a full block in the background.
// The result can be obtained via the returned channel. The
// timeout for building block is set to prevent some huge blocks.
// The result can be obtained via the returned channel.
resCh, err := api.eth.Miner().GetSealingBlockAsync(update.HeadBlockHash, payloadAttributes.Timestamp, payloadAttributes.SuggestedFeeRecipient, payloadAttributes.Random, false)
if err != nil {
log.Error("Failed to create async sealing payload", "err", err)
Expand Down
2 changes: 0 additions & 2 deletions eth/catalyst/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,10 +809,8 @@ func TestInvalidBloom(t *testing.T) {

func TestNewPayloadOnInvalidTerminalBlock(t *testing.T) {
genesis, preMergeBlocks := generatePreMergeChain(100)
//fmt.Println(genesis.Config.TerminalTotalDifficulty)
genesis.Config.TerminalTotalDifficulty = preMergeBlocks[0].Difficulty() //.Sub(genesis.Config.TerminalTotalDifficulty, preMergeBlocks[len(preMergeBlocks)-1].Difficulty())

//fmt.Println(genesis.Config.TerminalTotalDifficulty)
n, ethservice := startEthService(t, genesis, preMergeBlocks)
defer n.Close()

Expand Down
4 changes: 2 additions & 2 deletions miner/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func testGetSealingWork(t *testing.T, chainConfig *params.ChainConfig, engine co

// This API should work even when the automatic sealing is not enabled
for _, c := range cases {
resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false, 0)
resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false)
block := <-resChan
err := <-errChan
if c.expectErr {
Expand All @@ -651,7 +651,7 @@ func testGetSealingWork(t *testing.T, chainConfig *params.ChainConfig, engine co
// This API should work even when the automatic sealing is enabled
w.start()
for _, c := range cases {
resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false, 0)
resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false)
block := <-resChan
err := <-errChan
if c.expectErr {
Expand Down

0 comments on commit 0fe45c2

Please sign in to comment.