mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-30 19:55:42 +00:00
Old PrepareProposal and vote extension integration on feature/abci++ppp (#9117)
* abci: PrepareProposal-VoteExtension integration [2nd try] (#7821) * PrepareProposal-VoteExtension integration (#6915) * make proto-gen * Fix protobuf crash in e2e nightly tests * Update types/vote.go Co-authored-by: M. J. Fromberger <fromberger@interchain.io> * Addressed @creachadair's comments Co-authored-by: mconcat <monoidconcat@gmail.com> Co-authored-by: M. J. Fromberger <fromberger@interchain.io> * Proto changes * make proto-gen * Fixed UTs * bump * lint * lint2 * lint3 * lint4 * lint5 * lint6 * no_lint Co-authored-by: mconcat <monoidconcat@gmail.com> Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
co-authored by
M. J. Fromberger
mconcat
parent
61619ab072
commit
2164883501
+6
-1
@@ -97,6 +97,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
|
||||
height int64,
|
||||
state State, commit *types.Commit,
|
||||
proposerAddr []byte,
|
||||
votes []*types.Vote,
|
||||
) (*types.Block, *types.PartSet) {
|
||||
|
||||
maxBytes := state.ConsensusParams.Block.MaxBytes
|
||||
@@ -110,7 +111,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
|
||||
txs := blockExec.mempool.ReapMaxBytesMaxGas(maxDataBytes, maxGas)
|
||||
|
||||
preparedProposal, err := blockExec.proxyApp.PrepareProposalSync(
|
||||
abci.RequestPrepareProposal{BlockData: txs.ToSliceOfBytes(), BlockDataSize: maxDataBytes},
|
||||
abci.RequestPrepareProposal{
|
||||
BlockData: txs.ToSliceOfBytes(),
|
||||
BlockDataSize: maxDataBytes,
|
||||
Votes: types.VotesToProto(votes),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
// The App MUST ensure that only valid (and hence 'processable') transactions
|
||||
|
||||
@@ -408,7 +408,7 @@ func TestEndBlockValidatorUpdates(t *testing.T) {
|
||||
assert.EqualValues(t, 10, event.ValidatorUpdates[0].VotingPower)
|
||||
}
|
||||
case <-updatesSub.Cancelled():
|
||||
t.Fatalf("updatesSub was cancelled (reason: %v)", updatesSub.Err())
|
||||
t.Fatalf("updatesSub was canceled (reason: %v)", updatesSub.Err())
|
||||
case <-time.After(1 * time.Second):
|
||||
t.Fatal("Did not receive EventValidatorSetUpdates within 1 sec.")
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ func setupTestCase(t *testing.T) (func(t *testing.T), dbm.DB, sm.State) {
|
||||
return tearDown, stateDB, state
|
||||
}
|
||||
|
||||
// TestStateCopy tests the correct copying behaviour of State.
|
||||
// TestStateCopy tests the correct copying behavior of State.
|
||||
func TestStateCopy(t *testing.T) {
|
||||
tearDown, _, state := setupTestCase(t)
|
||||
defer tearDown(t)
|
||||
|
||||
Reference in New Issue
Block a user