Skip to content

types: move MakeBlock to block.go#5573

Merged
tac0turtle merged 1 commit intomasterfrom
marko/move_makeBlock
Oct 27, 2020
Merged

types: move MakeBlock to block.go#5573
tac0turtle merged 1 commit intomasterfrom
marko/move_makeBlock

Conversation

@tac0turtle
Copy link
Contributor

@tac0turtle tac0turtle commented Oct 26, 2020

Description

MakeBlock was housed in the test_util.go file but used in the state package in a production path:

block := types.MakeBlock(height, txs, commit, evidence)
, this pr moves the function out of test_utils into block.go. While an unneeded change it can cause confusion to why a test_util is used in production.

Closes: #XXX

@codecov
Copy link

codecov bot commented Oct 26, 2020

Codecov Report

Merging #5573 into master will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5573      +/-   ##
==========================================
+ Coverage   60.92%   61.08%   +0.15%     
==========================================
  Files         263      263              
  Lines       23751    23751              
==========================================
+ Hits        14471    14509      +38     
+ Misses       7796     7764      -32     
+ Partials     1484     1478       -6     
Impacted Files Coverage Δ
types/test_util.go 39.02% <ø> (-13.81%) ⬇️
types/block.go 74.27% <100.00%> (+0.57%) ⬆️
privval/signer_server.go 89.47% <0.00%> (-5.27%) ⬇️
blockchain/v0/reactor.go 60.59% <0.00%> (-0.99%) ⬇️
p2p/pex/pex_reactor.go 78.86% <0.00%> (-0.60%) ⬇️
consensus/state.go 68.40% <0.00%> (-0.28%) ⬇️
mempool/reactor.go 86.36% <0.00%> (ø)
consensus/replay.go 71.36% <0.00%> (+0.82%) ⬆️
blockchain/v0/pool.go 77.12% <0.00%> (+1.10%) ⬆️
blockchain/v2/reactor.go 35.07% <0.00%> (+1.49%) ⬆️
... and 6 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.

makes sense

@tac0turtle tac0turtle changed the title types: move MakeBlock types: move MakeBlock to block.go Oct 27, 2020
@tac0turtle tac0turtle merged commit 38587d8 into master Oct 27, 2020
@tac0turtle tac0turtle deleted the marko/move_makeBlock branch October 27, 2020 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants