This adds a simpler new implementation of getbalance logic along with asserts to confirm it behaves identically to the old logic. The old logic is removed in the next commit.
This adds a simpler new implementation of getbalance logic along with asserts to confirm it behaves identically to the old logic. The old logic is removed in the next commit.