Skip to content

Commit fb10c2d

Browse files
Ganesha UpadhyayaGanesha Upadhyaya
authored andcommitted
fix nil pointer dereference in PrepareProposal
1 parent 78e7994 commit fb10c2d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

state/executor.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@ func (e *BlockExecutor) CreateBlock(ctx context.Context, height uint64, lastComm
130130
rpp, err := e.proxyApp.PrepareProposal(
131131
ctx,
132132
&abci.RequestPrepareProposal{
133-
MaxTxBytes: maxBytes,
134-
Txs: mempoolTxs.ToSliceOfBytes(),
135-
LocalLastCommit: abci.ExtendedCommitInfo{},
133+
MaxTxBytes: maxBytes,
134+
Txs: mempoolTxs.ToSliceOfBytes(),
135+
LocalLastCommit: abci.ExtendedCommitInfo{
136+
Round: 0,
137+
Votes: []abci.ExtendedVoteInfo{},
138+
},
136139
Misbehavior: []abci.Misbehavior{},
137140
Height: int64(block.Height()),
138141
Time: block.Time(),

0 commit comments

Comments
 (0)