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

Faucet don't give a second chance #2210

Merged
merged 13 commits into from
Mar 12, 2019
Merged

Faucet don't give a second chance #2210

merged 13 commits into from
Mar 12, 2019

Conversation

sabau
Copy link
Contributor

@sabau sabau commented Mar 7, 2019

Description:

  • faucet gives money once in your lifetime
  • a bit more
  • sleep to pay less
    print date to have decent logs

Thank you! 🚀


For contributor:

  • Added entries in CHANGELOG.md with issue # and GitHub username
  • Reviewed Files changed in the github PR explorer
  • Attach screenshots of the UI components on the PR description (if applicable)
  • Scope of work approved for big PRs

For reviewer:

  • Manually tested the changes on the UI

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #2210 into develop will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2210      +/-   ##
==========================================
- Coverage    95.42%   95.4%   -0.02%     
==========================================
  Files          109     109              
  Lines         2295    2287       -8     
  Branches       116     114       -2     
==========================================
- Hits          2190    2182       -8     
  Misses          92      92              
  Partials        13      13
Impacted Files Coverage Δ
app/src/renderer/components/common/ShortBech32.vue 100% <0%> (ø) ⬆️
app/src/renderer/scripts/time.js 100% <0%> (ø) ⬆️
...c/renderer/components/staking/TabMyDelegations.vue 100% <0%> (ø) ⬆️
app/src/renderer/vuex/modules/delegation.js 91.37% <0%> (ø) ⬆️
...c/renderer/components/governance/TabParameters.vue 100% <0%> (ø) ⬆️
app/src/renderer/vuex/getters.js 90.56% <0%> (ø) ⬆️
app/src/renderer/components/common/ActionModal.vue 100% <0%> (ø) ⬆️

.aws/faucet.sh Outdated
ACCOUNT_INFO=$(./gaiacli query account ${DESTINATION} --chain-id ${NETWORK} --trust-node --home .)
dt=$(date '+%d/%m/%Y %H:%M:%S');
if [[ ${ACCOUNT_INFO} == *"auth/Account"* ]]; then
echo "$dt - $DESTINATION already funded, bye greedy b****rd!"
Copy link
Collaborator

Choose a reason for hiding this comment

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

lol i don't know about this b****rd

@@ -15,7 +15,7 @@ NODEID=$(./gaiad tendermint show-node-id --home .)

# Create our main account and add it to the genesis with a lot of money
echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log
./gaiad add-genesis-account $(./gaiacli keys show ${ACCOUNT} --home . --address) 100000000000000000stake,999000000000photino,123123123123cococoin --home .
./gaiad add-genesis-account $(./gaiacli keys show ${ACCOUNT} --home . --address) 1000000000000000000000stake,100000000000000000000photino,123123123123123123cococoin --home .
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not 9999999999999999999999999999999 so we don't run out

Copy link
Contributor Author

@sabau sabau Mar 7, 2019

Choose a reason for hiding this comment

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

18446744073709551615 should be the biggest available

go Tour

Copy link
Collaborator

Choose a reason for hiding this comment

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

lol ok why not that number then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are already overflowing XD:

1000000000000000000000
18446744073709551615

So probably we already have everything we can

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, on SDK I found out big integers are used so we have way more than 64 bits, as soon as I'm sure about the number of bits I'll update this number

.aws/faucet.sh Outdated
AMOUNTP=5photino
AMOUNTC=1cococoin
AMOUNTP=5000000photino
AMOUNTC=123123cococoin
Copy link
Contributor

Choose a reason for hiding this comment

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

Use pesocoin 🇨🇱

Copy link
Contributor Author

Choose a reason for hiding this comment

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

next coin will be that one

.aws/faucet.sh Outdated Show resolved Hide resolved
ADDRESS=$(./gaiacli keys show ${ACCOUNT} --home . --address)
echo "stakes $AMOUNTS at $DESTINATION"
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTS} --home . --from ${ADDRESS} --chain-id=${NETWORK}
sleep 5s # TODO: should be smarter, check if block was created or not
Copy link
Collaborator

Choose a reason for hiding this comment

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

smaller timeout doesn't work? @alessio this was the problem I explained

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah in this moment apparently that's the safest solution available

Co-Authored-By: sabau <szabo.karoly.a@gmail.com>
faboweb
faboweb previously approved these changes Mar 11, 2019
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
@codecov
Copy link

codecov bot commented Mar 12, 2019

Codecov Report

Merging #2210 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2210   +/-   ##
========================================
  Coverage    95.43%   95.43%           
========================================
  Files          109      109           
  Lines         2300     2300           
  Branches       116      116           
========================================
  Hits          2195     2195           
  Misses          92       92           
  Partials        13       13

sabau and others added 2 commits March 12, 2019 17:40
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
@jbibla jbibla merged commit f4d5b95 into develop Mar 12, 2019
@faboweb faboweb deleted the sabau/faucet-limit branch March 13, 2019 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants