Skip to content

Commit 1d4b542

Browse files
Ganesha UpadhyayaGanesha Upadhyaya
authored andcommitted
fix more nil pointer dereferences
1 parent fb10c2d commit 1d4b542

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

state/executor.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ func (e *BlockExecutor) CreateBlock(ctx context.Context, height uint64, lastComm
111111
},
112112
//LastHeaderHash: lastHeaderHash,
113113
//LastCommitHash: lastCommitHash,
114-
DataHash: make(types.Hash, 32),
115-
ConsensusHash: make(types.Hash, 32),
116-
AppHash: state.AppHash,
117-
LastResultsHash: state.LastResultsHash,
118-
ProposerAddress: e.proposerAddress,
114+
DataHash: make(types.Hash, 32),
115+
ConsensusHash: make(types.Hash, 32),
116+
AppHash: state.AppHash,
117+
LastResultsHash: state.LastResultsHash,
118+
ProposerAddress: e.proposerAddress,
119+
NextAggregatorsHash: state.NextValidators.Hash(),
119120
},
120121
Commit: *lastCommit,
121122
},
@@ -173,11 +174,14 @@ func (e *BlockExecutor) ProcessProposal(
173174
state types.State,
174175
) (bool, error) {
175176
resp, err := e.proxyApp.ProcessProposal(context.TODO(), &abci.RequestProcessProposal{
176-
Hash: block.Hash(),
177-
Height: int64(block.Height()),
178-
Time: block.Time(),
179-
Txs: block.Data.Txs.ToSliceOfBytes(),
180-
ProposedLastCommit: abci.CommitInfo{},
177+
Hash: block.Hash(),
178+
Height: int64(block.Height()),
179+
Time: block.Time(),
180+
Txs: block.Data.Txs.ToSliceOfBytes(),
181+
ProposedLastCommit: abci.CommitInfo{
182+
Round: 0,
183+
Votes: []abci.VoteInfo{},
184+
},
181185
Misbehavior: []abci.Misbehavior{},
182186
ProposerAddress: e.proposerAddress,
183187
NextValidatorsHash: block.SignedHeader.NextAggregatorsHash,

0 commit comments

Comments
 (0)