Skip to content
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

Merged
merged 4 commits into from
May 1, 2023
Merged

Add private community test for CI #60

merged 4 commits into from
May 1, 2023

Conversation

echevrier
Copy link
Collaborator

@echevrier echevrier commented Apr 18, 2023

Fix #59

@echevrier echevrier added A7-somethingelse B0-silent Item should not be mentioned in any change logs. (e.g. documentation updates) C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing labels Apr 18, 2023
@echevrier echevrier requested review from brenzi and clangenb April 19, 2023 07:32
fi

echo "2) Demurrage:"
if [ $REWARDED_BOB_COMMUNITY_CURRENCY -gt $DEMURRAGE_BOB_COMMUNITY_CURRENCY ]; then
Copy link
Member

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

cli/demo_private_community.sh Outdated Show resolved Hide resolved
@echevrier echevrier requested a review from brenzi April 24, 2023 08:28
Copy link
Member

@brenzi brenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx

@brenzi brenzi merged commit 1b77ada into main May 1, 2023
@echevrier echevrier deleted the ec/ci_test_balances branch May 3, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A7-somethingelse B0-silent Item should not be mentioned in any change logs. (e.g. documentation updates) C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI should fail if rewards not paid out
2 participants