-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add private community test for CI #60
Conversation
cli/demo_private_community.sh
Outdated
fi | ||
|
||
echo "2) Demurrage:" | ||
if [ $REWARDED_BOB_COMMUNITY_CURRENCY -gt $DEMURRAGE_BOB_COMMUNITY_CURRENCY ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
community currency should actually be reported as a float value by the cli and I'd expect Bob to have 1.0 units as reward for the demo community(not sure about the config). I don't understand why the cli reports the u128 representation. I can live with u128 rep for now, but:
This test is flawed, because bash can't handle bigint. It is a coincidence that this passes. It won't pass if the community income is set to 1000000 units. Our balance type U64F64 fixpoint is to big in its integer representation. tested on my ubuntu machine:
bash> ((X=2**64)); echo $X
0
that means, bash can't handle u128. Another proof:
if [ 69996761838461427612 -gt 69996761838461427611 ]; then echo "yes"; fi
bash: [: 69996761838461427612: integer expression expected
you should use bc
instead:
echo "69996761838461427610<69996761838461427611" | bc
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx
Fix #59