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
- Branch
- avapeers_file
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 25692 Build 50964: Build Diff lint-circular-dependencies · build-clang · build-diff · build-clang-tidy · build-without-wallet · build-debug Build 50963: arc lint + arc unit
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. |