Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
39 lines
834 B
Go
39 lines
834 B
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{"BLOCKSYNC": customBlocksyncReactor}),
|
|
)
|
|
|
|
The list of existing reactors can be found in CustomReactors documentation.
|
|
*/
|
|
package node
|