Skip to content

Commit

Permalink
Change function call and use policy
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTurner committed Mar 12, 2024
1 parent 9e5ef30 commit 2c08d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/protocol/tx-validity.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def available_balance(tx, assetId) -> int:
def unavailable_balance(tx, assetId) -> int:
sentBalance = sum_outputs(tx, assetId)
# Total fee balance
feeBalance = reserved_fee_balance(tx, assetId)
feeBalance = tx.policies.max_fee
# Only base asset can be used to pay for gas
if assetId == 0:
return sentBalance + feeBalance
Expand Down
2 changes: 1 addition & 1 deletion src/tx-format/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Transaction is invalid if:

- `max_fee` is not set
- `max_fee > sum_inputs(tx, BASE_ASSET_ID) - sum_outputs(tx, BASE_ASSET_ID)`
- `max_fee < reserved_fee_balance(tx, BASE_ASSET_ID)`
- `max_fee < max_fee(tx, BASE_ASSET_ID)`

0 comments on commit 2c08d43

Please sign in to comment.