Archive post
Hive-Nectar v0.0.9: A More Robust Node Handler
EDIT: Version is now 0.0.10 . Emergency hotfix for broken permlinks
Hey everyone,
Today, I'm happy to announce a new release for **`hive-nectar`**, which is now at version **0.0.9**. This update focuses on improving the reliability and intelligence of how the library handles Hive nodes. Plus, I took the opportunity to clean up a lot of minor linting errors that were annoying me. A clean codebase is a happy codebase!

The core of this update is a significant refactor of the `update_nodes` function within the `NodeList` class. This is the part of the library responsible for finding and maintaining a list of healthy, fast nodes to connect to.
---
#### What's New in Node Handling?
Previously, the logic for updating the node list was a bit scattered. Now, it's much smarter and more authoritative.
- **A Single Source of Truth:** The `update_nodes` function now gets its authoritative list of nodes and performance data directly from the `json_metadata` of the `@nectarflower` account. This ensures it's always working with the most current and accurate report.
- **Smarter Scoring:** Instead of calculating scores locally, the function now directly uses the `weighted_score` provided in the report for ranking nodes. Any nodes not in the report have their scores zeroed out, so they don't interfere with the official ranking.
- **Dynamic Node Discovery:** The library now dynamically adds new nodes it finds in the report, even if they weren't in the original hard-coded list. This includes nodes that are known to be failing, which are correctly added with a score of -1 to avoid being used. This ensures the node list is always complete and up-to-date.
- **Cleaner Code:** A lot of unused fallback paths and redundant code were removed to make the logic leaner and easier to maintain.
These changes mean that any application using `hive-nectar` will be much more resilient and intelligent when connecting to the Hive blockchain. It will automatically favor the best-performing nodes and avoid ones that are down or struggling, leading to a faster and more reliable experience for the end-user.
This is an important step forward for the library, and I'm excited to get these improvements out there.
As always,
Michael Garcia a.k.a. TheCrazyGM