https://github.com/tendermint/tendermint
Revision 7b162f5c54267d716ef2e66912d59a0bd993a84f authored by Thane Thomson on 26 April 2019, 12:05:39 UTC, committed by Anton Kaliaev on 26 April 2019, 12:05:39 UTC
The node.NewNode method is pretty complex at the moment, an in order to address issues like #3156, we need to simplify the interface for partial node instantiation. In some places, we don't need to build up a full node (like in the node.TestCreateProposalBlock test), but the complexity of such partial instantiation needs to be reduced.

This PR aims to eventually make this easier/simpler.

See also this gist https://gist.github.com/thanethomson/56e1640d057a26186e38ad678a1d114c for some background work done when starting to refactor here.

## Commits:

* [WIP] Refactor node.NewNode to simplify

The `node.NewNode` method is pretty complex at the moment, an in order
to address issues like #3156, we need to simplify the interface for
partial node instantiation. In some places, we don't need to build up a
full node (like in the `node.TestCreateProposalBlock` test), but the
complexity of such partial instantiation needs to be reduced.

This PR aims to eventually make this easier/simpler.

* Refactor state loading and genesis doc provider into state package

* Refactor for clarity of return parameters

* Fix incorrect capitalization of error messages

* Simplify extracted functions' names

* Document optionally-prefixed functions

* Refactor optionallyFastSync for clarity of separation of concerns

* Restructure function for early return

* Restructure function for early return

* Remove dependence on deprecated panic functions

* refactor code a bit more

plus, expose PEXReactor on node

* align logger names

* add a changelog entry

* align logger names 2

* add a note about PEXReactor returning nil
1 parent 70592cc
History
Tip revision: 7b162f5c54267d716ef2e66912d59a0bd993a84f authored by Thane Thomson on 26 April 2019, 12:05:39 UTC
node: refactor node.NewNode (#3456)
Tip revision: 7b162f5
File Mode Size
.circleci
.github
DOCKER
abci
benchmarks
blockchain
cmd
config
consensus
crypto
docs
evidence
libs
lite
mempool
networks
node
p2p
privval
proxy
rpc
scripts
state
test
tools
types
version
.editorconfig -rw-r--r-- 280 bytes
.gitignore -rw-r--r-- 494 bytes
.golangci.yml -rw-r--r-- 1.1 KB
CHANGELOG.md -rw-r--r-- 103.8 KB
CHANGELOG_PENDING.md -rw-r--r-- 1022 bytes
CODE_OF_CONDUCT.md -rw-r--r-- 4.9 KB
CONTRIBUTING.md -rw-r--r-- 7.1 KB
Gopkg.lock -rw-r--r-- 15.0 KB
Gopkg.toml -rw-r--r-- 1.9 KB
LICENSE -rw-r--r-- 11.1 KB
Makefile -rw-r--r-- 10.4 KB
PHILOSOPHY.md -rw-r--r-- 7.5 KB
README.md -rw-r--r-- 6.9 KB
ROADMAP.md -rw-r--r-- 861 bytes
SECURITY.md -rw-r--r-- 1.7 KB
UPGRADING.md -rw-r--r-- 12.6 KB
Vagrantfile -rw-r--r-- 2.1 KB
appveyor.yml -rw-r--r-- 279 bytes
codecov.yml -rw-r--r-- 330 bytes
docker-compose.yml -rw-r--r-- 1.3 KB

README.md

back to top