github.com/DFWallet/tendermint-cosmos@v0.0.2/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  				metricsProvider,
    17  				logger,
    18  				CustomReactors(map[string]p2p.Reactor{"CUSTOM": customReactor}),
    19  		)
    20  
    21  Replacing existing p2p.Reactor(s)
    22  
    23  To replace the built-in p2p.Reactor, use the CustomReactors option:
    24  
    25  		node, err := NewNode(
    26  				config,
    27  				privVal,
    28  				nodeKey,
    29  				clientCreator,
    30  				genesisDocProvider,
    31  				dbProvider,
    32  				metricsProvider,
    33  				logger,
    34  				CustomReactors(map[string]p2p.Reactor{"BLOCKCHAIN": customBlockchainReactor}),
    35  		)
    36  
    37  The list of existing reactors can be found in CustomReactors documentation.
    38  
    39  */
    40  package node