Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2457 #2731

Merged
merged 10 commits into from Nov 26, 2018
Merged

Fix 2457 #2731

merged 10 commits into from Nov 26, 2018

Conversation

ebuchman
Copy link
Contributor

@ebuchman ebuchman commented Oct 30, 2018

Replaces #2621
ref #2457

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

😋

blockchain/pool.go Show resolved Hide resolved
blockchain/reactor.go Show resolved Hide resolved
blockchain/reactor_test.go Outdated Show resolved Hide resolved
blockchain/store_test.go Outdated Show resolved Hide resolved
}
}
}

/*
// NOTE: This is too hard to test without
// an easy way to add test peer to switch
// or without significant refactoring of the module.
// Alternatively we could actually dial a TCP conn but
// that seems extreme.
func TestBadBlockStopsPeer(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

these tests remind me of our consensus tests - hard to read, hard to modify, hard to debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, will have to do for now. In future we'll need to restructure the reactors for better testing.

@codecov-io
Copy link

codecov-io commented Oct 31, 2018

Codecov Report

Merging #2731 into develop will increase coverage by 0.55%.
The diff coverage is 68%.

@@             Coverage Diff             @@
##           develop    #2731      +/-   ##
===========================================
+ Coverage    62.19%   62.75%   +0.55%     
===========================================
  Files          212      212              
  Lines        17362    17388      +26     
===========================================
+ Hits         10799    10911     +112     
+ Misses        5654     5561      -93     
- Partials       909      916       +7
Impacted Files Coverage Δ
evidence/reactor.go 62.62% <0%> (ø) ⬆️
blockchain/reactor.go 67.61% <62.5%> (+31.83%) ⬆️
blockchain/pool.go 79.52% <75%> (+13.08%) ⬆️
privval/tcp_server.go 78.57% <0%> (-2.86%) ⬇️
consensus/reactor.go 66.16% <0%> (-0.12%) ⬇️
p2p/metrics.go 17.94% <0%> (+2.56%) ⬆️

@milosevic milosevic self-assigned this Nov 8, 2018
@milosevic
Copy link
Contributor

LGTM. As @melekes also pointed out tests are very hard to understand, but we should address this into separate task (issue created #2897).

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

🥑

@ebuchman ebuchman merged commit 47a0669 into develop Nov 26, 2018
@ebuchman ebuchman deleted the fix_2457 branch November 26, 2018 20:31
danil-lashin pushed a commit to danil-lashin/tendermint that referenced this pull request Nov 27, 2018
* develop:
  types: Emit tags from BeginBlock/EndBlock (tendermint#2747)
  Fix fast sync stack with wrong block tendermint#2457 (tendermint#2731)
  It's better read from genDoc than from state.validators when appHeight==0 in replay (tendermint#2893)
  update encoding spec (tendermint#2903)
  return back initially allowed level if we encounter allowed key (tendermint#2889)
  Handling integer IDs in JSON-RPC requests -- fixes tendermint#2366 (tendermint#2811)

# Conflicts:
#	blockchain/reactor_test.go
#	blockchain/store_test.go
#	node/node_test.go
#	types/events.go
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.

None yet

5 participants