You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
859 B

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