Skip to content

state/types: refactor makeBlock, makeBlocks and makeTxs#6567

Merged
mergify[bot] merged 2 commits intotendermint:masterfrom
JayT106:refactor-makeX
Jun 11, 2021
Merged

state/types: refactor makeBlock, makeBlocks and makeTxs#6567
mergify[bot] merged 2 commits intotendermint:masterfrom
JayT106:refactor-makeX

Conversation

@JayT106
Copy link
Contributor

@JayT106 JayT106 commented Jun 10, 2021

Closes #3584

@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

Merging #6567 (f4983de) into master (a456b71) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #6567      +/-   ##
==========================================
- Coverage   61.22%   61.19%   -0.04%     
==========================================
  Files         295      295              
  Lines       27848    27847       -1     
==========================================
- Hits        17049    17040       -9     
- Misses       9084     9097      +13     
+ Partials     1715     1710       -5     
Impacted Files Coverage Δ
internal/test/factory/tx.go 0.00% <0.00%> (ø)
internal/p2p/transport_memory.go 82.89% <0.00%> (-2.64%) ⬇️
internal/mempool/v0/reactor.go 73.79% <0.00%> (-1.38%) ⬇️
internal/p2p/transport_mconn.go 81.28% <0.00%> (-0.99%) ⬇️
internal/p2p/router.go 81.58% <0.00%> (-0.70%) ⬇️
internal/p2p/switch.go 60.18% <0.00%> (-0.47%) ⬇️
internal/consensus/peer_state.go 83.77% <0.00%> (-0.44%) ⬇️
internal/consensus/reactor.go 70.83% <0.00%> (-0.31%) ⬇️
internal/consensus/state.go 67.18% <0.00%> (-0.28%) ⬇️
... and 4 more

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job 👍

I'm not too sure how much of these test helpers we want to expose for external users. There's been a lot of recent discussion surrounding internalisation and I think testing is another part of this that we should probably have a short discussion about

@alexanderbez alexanderbez added the S:automerge Automatically merge PR when requirements pass label Jun 11, 2021
@mergify mergify bot merged commit 10fa151 into tendermint:master Jun 11, 2021
sergio-mena added a commit that referenced this pull request Aug 3, 2022
* ----start----

* [PARTIAL cherry-pick] ABCI Vote Extension 2 (#6885)

* Cherry-picked #6567: state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)

* [Cherrypicked] types: remove panic from block methods (#7501)

* [cherrypicked] abci++: synchronize PrepareProposal with the newest version of the spec (#8094)

This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.

* make proto-gen

* Backported EvidenceList's method ToABCI from #7961

* make build

* Fix mockery for Mempool

* mockery

* Backported abci Application mocks from #7961

* mockery2

* Fixed new PrepareProposal test cases in state/execution_test.go

* Fixed returned errors in consensus/state.go

* lint

* Addressed @cmwaters' comment

Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
samricotta pushed a commit that referenced this pull request Aug 16, 2022
* ----start----

* [PARTIAL cherry-pick] ABCI Vote Extension 2 (#6885)

* Cherry-picked #6567: state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)

* [Cherrypicked] types: remove panic from block methods (#7501)

* [cherrypicked] abci++: synchronize PrepareProposal with the newest version of the spec (#8094)

This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.

* make proto-gen

* Backported EvidenceList's method ToABCI from #7961

* make build

* Fix mockery for Mempool

* mockery

* Backported abci Application mocks from #7961

* mockery2

* Fixed new PrepareProposal test cases in state/execution_test.go

* Fixed returned errors in consensus/state.go

* lint

* Addressed @cmwaters' comment

Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:automerge Automatically merge PR when requirements pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

state/types: Move all makeX functions into X/test_helpers.go

3 participants