node: change package interface (#6540)

This commit is contained in:
Sam Kleinman
2021-06-04 11:36:30 -04:00
committed by GitHub
parent 08b134ddbc
commit 00c284d9d7
11 changed files with 227 additions and 343 deletions
+3 -37
View File
@@ -1,40 +1,6 @@
/*
Package node is the main entry point, where the Node struct, which
represents a full node, is defined.
Adding new p2p.Reactor(s)
To add a new p2p.Reactor, use the CustomReactors option:
node, err := NewNode(
config,
privVal,
nodeKey,
clientCreator,
genesisDocProvider,
dbProvider,
metricsProvider,
logger,
CustomReactors(map[string]p2p.Reactor{"CUSTOM": customReactor}),
)
Replacing existing p2p.Reactor(s)
To replace the built-in p2p.Reactor, use the CustomReactors option:
node, err := NewNode(
config,
privVal,
nodeKey,
clientCreator,
genesisDocProvider,
dbProvider,
metricsProvider,
logger,
CustomReactors(map[string]p2p.Reactor{"BLOCKCHAIN": customBlockchainReactor}),
)
The list of existing reactors can be found in CustomReactors documentation.
Package node is the main entry point, where the tendermint node
service is constructed and the implementation of that service is
defined.
*/
package node