A Good Week for Small Hive-Engine Fixes
Hey everyone,
This was a good week.
I had two Hive-Engine related PRs accepted:
The Documentation PR
The first PR was a cleanup pass on the Hive Smart Contracts wiki.
That one was bigger than I originally expected.
Some of the documentation was still carrying older Steem-era language. Some setup notes were stale. Some examples were still referencing old field names. A lot of the code blocks were also in rough shape from a Markdown/linting point of view.
So the PR ended up doing two things at once:
- actual content cleanup
- formatting and code fence cleanup
The formatting made the diff look bigger than the real conceptual change.
But the important part was the content.
I updated the docs against the current references, including things like:
- Hive terminology instead of old Steem wording
- MongoDB and
isolated-vmreferences - current Node/npm setup notes
- JSON-RPC field names
- smart contract guide updates
- a current contract action index generated from the contract files
Not fancy, just useful.
The Comments Contract Bug
The second PR came from issue #136.
I was tagged on it by @faireye (faireye-hive on github), took a look, and the bug was pretty direct.
In the comments contract, payOutBeneficiaries() handled app tax as part of the beneficiary payout calculation.
But when a post had no beneficiaries, it returned 0.
That meant the app tax could still be paid out, but it was not deducted from the author's payout.
So instead of the author's reward being reduced by the app tax, the contract could over-distribute.
The fix was small:
return totalBenePay;
instead of returning zero in that no-beneficiaries path.
Why This Felt Good
Neither PR is flashy.
One was documentation work.
One was a one-line contract behavior fix plus minified output.
One PR made the system easier to approach, the other made a payout edge case behave correctly.
That is a good week.
As always,
Michael Garcia a.k.a. TheCrazyGM
Leave A Good Week for Small Hive-Engine Fixes to:
Read more #hive-engine posts
Best Posts From Michael Garcia
We have not curated any of thecrazygm's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Michael Garcia
- Moon Has Moved to Finland
- A Good Week for Small Hive-Engine Fixes
- An Accidental Stress Test for Hive-Engine Data Integrity
- Fixing Data Integrity Issues in Hive-Engine Nodes
- The Final Chapter: dCity's 70,000 HIVE Claimdrop Has Been Distributed!
- Anther v0.1.0: A Modern Go SDK for Building on Hive
- Redesigning the Project Builder (GET FEATURED!)
- HiveTools Workbench: A Week of Polish, Pollen, and Splinterlands Wallets
- Pollen: A Safer, Cleaner Path Forward for Hive JavaScript Developers
- NectarPay Is Live, and Solana USDC Payments Are Working