File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from __future__ import annotations
4
4
5
+ import math
5
6
from typing import Dict , List , Optional , Union
6
7
7
8
import cbor2
@@ -43,11 +44,11 @@ def fee(
43
44
Return:
44
45
int: Minimum acceptable transaction fee.
45
46
"""
46
- return (
47
- int (length * context .protocol_param .min_fee_coefficient )
48
- + int (context .protocol_param .min_fee_constant )
49
- + int (exec_steps * context .protocol_param .price_step )
50
- + int (max_mem_unit * context .protocol_param .price_mem )
47
+ return int (
48
+ math . ceil (length * context .protocol_param .min_fee_coefficient )
49
+ + math . ceil (context .protocol_param .min_fee_constant )
50
+ + math . ceil (exec_steps * context .protocol_param .price_step )
51
+ + math . ceil (max_mem_unit * context .protocol_param .price_mem )
51
52
)
52
53
53
54
You can’t perform that action at this time.
0 commit comments