Jae Kwon
1b9323f105
Fix blockchain tests
7 years ago
Jae Kwon
196f8410ba
WIP commit; Fix types/results_test
7 years ago
Anton Kaliaev
2a24ae90c1
fixes from Jae's review
1. remove pointer
2. add Quit() method to Service interface
7 years ago
Anton Kaliaev
11b68f1934
rewrite broadcastTxRoutine to use channels
https://play.golang.org/p/gN21yO9IRs3
```
func waitWithCancel(f func() *clist.CElement, ctx context.Context) *clist.CElement {
el := make(chan *clist.CElement, 1)
select {
case el <- f():
```
will just run f() blockingly, so this doesn't change much in terms of behavior.
7 years ago
Ethan Buchman
4051391039
blockchain: test wip for hard to test functionality [ci skip]
7 years ago
Adrian Brink
a30315276b
Formatting and documentation
7 years ago
Ethan Buchman
3368eeb03e
fix tests
7 years ago
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
7 years ago
Ethan Buchman
1d6f00859d
fixes from review
7 years ago
Ethan Buchman
537b0dfa1a
use NopEventBus
7 years ago
Ethan Buchman
0acca7fe69
final updates for state
7 years ago
Ethan Buchman
bac60f2067
blockchain: update for new state
7 years ago
Ethan Buchman
3d00c477fc
separate block vs state based validation
7 years ago
Anton Kaliaev
843e1ed400
Updates -> ValidatoSetUpdates
7 years ago
Ethan Frey
960b25408f
Store LastConsensusHash in State as well
Update all BlockValidation that it matches the last state
7 years ago
Ethan Frey
d151e36ea8
Add ConsensusHash to header
7 years ago
Ethan Buchman
78a682e4b6
blockchain: test fixes
7 years ago
Ethan Frey
dedf03bb81
Add TotalTx to block header, issue #952
Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
7 years ago
Emmanuel Odeke
2da5299924
blockchain: less fragile and involved tests for blockstore
With feedback from @ebuchman , to make the tests nicer
and less fragile.
7 years ago
Anton Kaliaev
922af7c405
int64 height
uint64 is considered dangerous. the details will follow in a blog post.
7 years ago
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
7 years ago
Anton Kaliaev
e06bbaf303
refactor TestNoBlockMessageResponse to eliminate a race condition
7 years ago
Anton Kaliaev
716364182d
[state] expose ChainID and Params
```
jaekwon
Yeah we should definitely expose ChainID.
ConsensusParams is small enough, we can just write it.
```
https://github.com/tendermint/tendermint/pull/676#discussion_r144123203
7 years ago
Ethan Buchman
659768783f
blockchain: fixing reactor tests
7 years ago
Emmanuel Odeke
068f01368f
blockchain/reactor: respondWithNoResponseMessage for missing height
Fixes #514
Replaces #540
If a peer requests a block with a height that we don't have
respond with a bcNoBlockResponseMessage.
However, according to the Tendermint spec, if all nodes are honest
this condition shouldn't occur, so this is a possible hint of an
dishonest node.
7 years ago