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

Make faucet with 10 available UTxO for Jörmungandr #471

Merged
merged 4 commits into from
Jun 25, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Jun 25, 2019

Issue Number

#358

Overview

  • I have reviewed the faucet generation code to use the first 10 addresses for each mnemonic instead of 10x the first one
  • I have re-worked some integration tests assertions which assumed that only the first address was used.

Comments

KtorZ added 3 commits June 25, 2019 11:28
This is because with Jörmungandr, we can't have an initial UTxO in that form: the input txid
in the genesis file are generated from the initial configuration address and value. So, having
duplicated 'fund' sections would lead to multiple transactions with a same id, which is
of course forbidden. Instead, we can generate and use the first 10 addresses of each fixture
wallet, but also have to do it for http-bridge
@KtorZ KtorZ requested review from paweljakubas and piotr-iohk June 25, 2019 10:33
let outs = uncurry TxOut . (,Coin 100000000000) . firstAddress <$> wallets
unsafeRunExceptT $ postTx nl (mkRedeemTx $ mconcat $ replicate 10 outs)
let mkFaucet addr = TxOut addr (Coin 100000000000)
let outs = mconcat [ mkFaucet <$> take 10 (addresses w) | w <- wallets ]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

-- ta1swgj8q58unau52gfwzwl9z5g2twg8nsj76q69589yhl3y2t4zs5qu0eslsc
-- ta1svuw4z8qj6tg0vly6x7zes58gsh2cf60dk7d4gtfjperextk7chscash9yc
genFaucets :: Int -> IO ()
genFaucets n = do
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

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

LGTM!

@KtorZ KtorZ mentioned this pull request Jun 25, 2019
3 tasks
@paweljakubas paweljakubas merged commit 8a11a75 into master Jun 25, 2019
@paweljakubas paweljakubas deleted the KtorZ/jormungandr-faucet-fix branch June 25, 2019 11:39
@KtorZ KtorZ added this to the Jörmungandr Integration Testing milestone Jul 2, 2019
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.

2 participants