Revision 0a3bdbb71bfb01cc54ef50ea8f3b66212ffeb6e4 authored by Anton Kaliaev on 27 April 2020, 10:58:37 UTC, committed by GitHub on 27 April 2020, 10:58:37 UTC
1 parent d5c63c0
Raw File
doc.go
/*
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
back to top