Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Conversation

@aeharvlee
Copy link
Contributor

@aeharvlee aeharvlee commented Jul 4, 2022

Proposed changes

Test cases should work after Klaytn applied Dynamic fee policy.
For this, I changed unit price of Klaytn which is not 25 ston.

1. Updated legacy test cases
We should confirm that legacy test works fine when Klaytn activate dynamic gas price policy.

For this, gas price should be fetched by using gasProvider.getGasPrice().
And also increase gas limit because some test cases on recent Klaytn node requires more gas.

2. Updated recent test cases
We need to use caver.transaction.${txType}.create to create transaction instance because now we need to fetch dynamic gas price and set with that value.

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

related to #321

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

When fill gasPrice, the price should be enabled to change based on Klaytn network.
Klaytn will apply dynamic gasPrice policy, so need to preapre for it.
If we don't remove get keyword, that method is called during serializing/de-serealizing process.
So we shouldn't use get keyword in front of the method name
This class is used in codegen package, so it should not be deprecated currently
It should be attached
We should confirm that legacy test works fine when Klaytn activate dynamic gas price policy.

For this, gas price should be fetched by using gasProvider.getGasPrice().
We should confirm that legacy test works fine when Klaytn activate dynamic gas price policy.

For this, gas price should be fetched by using gasProvider.getGasPrice().
Both should work when Klaytn uses Dynamic fee policy.
For this, I changed unit price of Klaytn which is not 25 ston.

1. Updated legacy test cases
We should confirm that legacy test works fine when Klaytn activate dynamic gas price policy.

For this, gas price should be fetched by using gasProvider.getGasPrice().
And also increase gas limit because some test cases on recent Klaytn node requires more gas.

2. Updated recent test cases
We need to use caver.transaction.${txType}.create to create transaction instance because now we need to fetch dynamic gas price and set with that value.
… updates-legacy-testcases-0

# Conflicts:
#	core/src/test/java/com/klaytn/caver/base/Accounts.java
#	core/src/test/java/com/klaytn/caver/legacy/feature/ManagedTransactionTest.java
#	core/src/test/java/com/klaytn/caver/legacy/scenario/AccountKeyIT.java
#	core/src/test/java/com/klaytn/caver/legacy/scenario/Scenario.java
@aeharvlee aeharvlee requested a review from jimni1222 as a code owner July 4, 2022 08:44
@aeharvlee aeharvlee self-assigned this Jul 4, 2022
aeharvlee added 3 commits July 5, 2022 09:36
If we call gasProvider.getGasPrice every time, it can be changed because gasPrice depends on network status.

During test, many txs can be processed and gasPrice can be dynamic.
Copy link
Contributor

@jimni1222 jimni1222 left a comment

Choose a reason for hiding this comment

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

LGTM!!!!

@aeharvlee aeharvlee merged commit c78a9d9 into klaytn:dev Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants