Hey everyone,
This was a good week.
I had two Hive-Engine related PRs accepted:
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:
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:
isolated-vm referencesNot fancy, just useful.
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.
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