This diff adds a couple function to save and load peers to/from a file. This will make it possible to dump during shutdown and load upon startup, similar to what is done for the mempool. This is a step toward a faster bootstrap time when starting an avalanche node, especially to make the staking reward decision faster upon restart.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC2cfc190651da: [avalanche] Add dump and load functions to save/load the avalanche peers…
ninja check-avalanche-peermanager_tests
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/avalanche/peermanager.cpp | ||
---|---|---|
1138 ↗ | (On Diff #43190) | What is the benefit of saving the peerid? I see that it is not used in the load function, and this is expected to be assigned automatically based on the order the peers are loaded in. |
src/avalanche/peermanager.cpp | ||
---|---|---|
1138 ↗ | (On Diff #43190) | This is just a way to dump all the peer set. It can be read from another tool to compare with the debug log if needed. |