-
Notifications
You must be signed in to change notification settings - Fork 17
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
extend faucet package support for other transactions #1380
Conversation
5ef52f8
to
37e269c
Compare
Pull Request Test Coverage Report for Build 10735680045Details
💛 - Coveralls |
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, added a couple tests and a small refactor as fixup
commits, please do git rebase -i main
before merging
// should work, try using a faucet package for a set account info tx | ||
// first create the account (and check balance is 0, because tx cost 200) | ||
faucetPkg, err = GenerateFaucetPackage(signers[0], signers[9].Address(), 200) | ||
qt.Assert(t, err, qt.IsNil) | ||
qt.Assert(t, testSetAccountTx(t, | ||
signers[9], signers[9].Address(), faucetPkg, app, "", uint32(0), true), | ||
qt.IsNil, | ||
) |
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.
maybe it would be interesting to include as well 199, so the faucet would not produce enough balance to actually execute the transaction. this might trigger weird bugs, not now (due to the canPayForTx check 🙌) but the test would catch future regressions
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.
i added this test i mentioned, and also another corner case test, where none of the current balance OR the faucet are enough to cover the txcost, but combined they do.
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.
thanks
e4ba715
to
02e6e13
Compare
found a small bug, fixing it |
ok, feel free to merge it yourself when ready |
i pushed the fix, i'm still extending and readapting the tests, will merge as soon as i finish |
Faucet package can now be used on NewProcess, SetAccount, SetProcess and SetSik related transactions. Signed-off-by: p4u <[email protected]>
559b0fe
to
4e9a11e
Compare
Faucet package can now be used on NewProcess, SetAccount, SetProcess and SetSik related transactions.