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

Commit

Permalink
empty payload
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Jan 30, 2024
1 parent e56c679 commit 14511c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions cosmos/runtime/miner/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,26 @@ func (m *Miner) PrepareProposal(
ctx sdk.Context, req *abci.RequestPrepareProposal,
) (*abci.ResponsePrepareProposal, error) {
var (
// payloadEnvelopeBz []byte
err error
valTxs [][]byte
ethGasUsed uint64
payloadEnvelopeBz []byte
err error
valTxs [][]byte
ethGasUsed uint64
)

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

// Process the validator messages.
if valTxs, err = m.processValidatorMsgs(ctx, req.MaxTxBytes, ethGasUsed, req.Txs); err != nil {
return nil, err
}

// Combine the payload envelope with the validator transactions.
// allTxs := [][]byte{payloadEnvelopeBz}
allTxs := [][]byte{payloadEnvelopeBz}

// If there are validator transactions, append them to the allTxs slice.
allTxs := [][]byte{}
if len(valTxs) > 0 {
allTxs = append(allTxs, valTxs...)
}
Expand Down
2 changes: 1 addition & 1 deletion cosmos/runtime/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (m *Miner) resolveEnvelope() ([]byte, uint64) {
if m.currentPayload == nil {
return nil, 0
}
envelope := m.currentPayload.ResolveFull()
envelope := m.currentPayload.ResolveEmpty()
payload := envelope.ExecutionPayload

// Record metadata about the payload
Expand Down

0 comments on commit 14511c8

Please sign in to comment.