github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/bft/node/doc.go (about) 1 /* 2 Package node is the main entry point, where the Node struct, which 3 represents a full node, is defined. 4 5 Adding new p2p.Reactor(s) 6 7 To add a new p2p.Reactor, use the CustomReactors option: 8 9 node, err := NewNode( 10 config, 11 privVal, 12 nodeKey, 13 clientCreator, 14 genesisDocProvider, 15 dbProvider, 16 logger, 17 CustomReactors(map[string]p2p.Reactor{"CUSTOM": customReactor}), 18 ) 19 20 Replacing existing p2p.Reactor(s) 21 22 To replace the built-in p2p.Reactor, use the CustomReactors option: 23 24 node, err := NewNode( 25 config, 26 privVal, 27 nodeKey, 28 clientCreator, 29 genesisDocProvider, 30 dbProvider, 31 logger, 32 CustomReactors(map[string]p2p.Reactor{"BLOCKCHAIN": customBlockchainReactor}), 33 ) 34 35 The list of existing reactors can be found in CustomReactors documentation. 36 */ 37 package node