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

Multi inputs endpoint - add more flexibilty #1090

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tdroxler
Copy link
Member

No description provided.

Before, we were limited to either all inputs having defined gas or none at all.
This commit adds more flexibility, such as enabling one address to cover gas costs
for others.

First we keep the same exact computing of gas per input, so we could potentially
reduce the selected gas as previously.

But on the second phase, in `updateMissingFeeFromSelectedGas`
we check how many is already paid by the addresses that defined some gas.

There are now two cases:
1. The explicit gas doesn't cover the overall gas needed for the tx:
   The addresses that didn't defined some gas will share this missing
   gas
2. There is enough gas for the all tx, it means we can update the gas
   to 0 to addresses that didn't define a gas.
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 97.82609% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.43%. Comparing base (cf232a3) to head (99d91a6).

Files Patch % Lines
...rc/main/scala/org/alephium/flow/core/TxUtils.scala 97.82% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1090      +/-   ##
==========================================
+ Coverage   92.38%   92.43%   +0.04%     
==========================================
  Files         378      378              
  Lines       18695    18725      +30     
  Branches     2015     2026      +11     
==========================================
+ Hits        17271    17308      +37     
+ Misses       1424     1417       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 27, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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

1 participant