Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
bet
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Jun 1, 2024
1 parent f69806f commit ba0c43e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions cosmos/runtime/miner/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ func (m *Miner) PrepareProposal(
)

// Trigger the geth miner to build a block.
if payloadEnvelopeBz, ethGasUsed, err = m.buildBlock(
ctx, uint64(req.GetTime().Unix()),
); err != nil {
if payloadEnvelopeBz, ethGasUsed, err = m.buildBlock(ctx); err != nil {
return nil, err
}

Expand Down
6 changes: 3 additions & 3 deletions cosmos/runtime/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (m *Miner) Init(serializer EnvelopeSerializer) {

// buildBlock builds and submits a payload, it also waits for the txs
// to resolve from the underlying worker.
func (m *Miner) buildBlock(ctx sdk.Context, payloadTimestamp uint64) ([]byte, uint64, error) {
func (m *Miner) buildBlock(ctx sdk.Context) ([]byte, uint64, error) {
defer m.clearPayload()

// Record the time it takes to build a payload.
Expand All @@ -88,7 +88,7 @@ func (m *Miner) buildBlock(ctx sdk.Context, payloadTimestamp uint64) ([]byte, ui
defer m.blockBuilderMu.Unlock()

// Submit payload for building with the given context.
if err := m.submitPayloadForBuilding(ctx, payloadTimestamp); err != nil {
if err := m.submitPayloadForBuilding(ctx); err != nil {
return nil, 0, err
}
env, gasUsed := m.resolveEnvelope()
Expand All @@ -97,7 +97,7 @@ func (m *Miner) buildBlock(ctx sdk.Context, payloadTimestamp uint64) ([]byte, ui
}

// submitPayloadForBuilding submits a payload for building.
func (m *Miner) submitPayloadForBuilding(ctx context.Context, payloadTimestamp uint64) error {
func (m *Miner) submitPayloadForBuilding(ctx context.Context) error {
var (
err error
payload *miner.Payload
Expand Down

0 comments on commit ba0c43e

Please sign in to comment.