@@ -1702,6 +1702,7 @@ class DB {
17021702 auth , tx , timestamp , blockNumber , blockTime , executionResult , eventSource , isDryrun ) {
17031703 const gasPriceUnit =
17041704 DB . getBlockchainParam ( 'resource/gas_price_unit' , blockNumber , this . stateRoot ) ;
1705+ const enableGasCostFlooring = isEnabledTimerFlag ( 'allow_up_to_6_decimal_transfer_value_only' , blockNumber ) ;
17051706 const gasPrice = tx . tx_body . gas_price ;
17061707 // Use only the service gas amount total
17071708 const serviceBandwidthGasAmount = _ . get ( tx , 'extra.gas.bandwidth.service' , 0 ) ;
@@ -1711,7 +1712,7 @@ class DB {
17111712 if ( gasAmountChargedByTransfer <= 0 || gasPrice === 0 ) { // No fees to collect
17121713 executionResult . gas_amount_charged = gasAmountChargedByTransfer ;
17131714 executionResult . gas_cost_total =
1714- CommonUtil . getTotalGasCost ( gasPrice , gasAmountChargedByTransfer , gasPriceUnit ) ;
1715+ CommonUtil . getTotalGasCost ( gasPrice , gasAmountChargedByTransfer , gasPriceUnit , enableGasCostFlooring ) ;
17151716 return ;
17161717 }
17171718 const billing = tx . tx_body . billing ;
@@ -1724,7 +1725,7 @@ class DB {
17241725 }
17251726 }
17261727 let balance = this . getBalance ( billedTo ) ;
1727- const gasCost = CommonUtil . getTotalGasCost ( gasPrice , gasAmountChargedByTransfer , gasPriceUnit ) ;
1728+ const gasCost = CommonUtil . getTotalGasCost ( gasPrice , gasAmountChargedByTransfer , gasPriceUnit , enableGasCostFlooring ) ;
17281729 if ( ! isDryrun && balance < gasCost ) {
17291730 Object . assign ( executionResult , {
17301731 code : TxResultCode . FEE_BALANCE_TOO_LOW ,
@@ -1736,7 +1737,7 @@ class DB {
17361737 }
17371738 executionResult . gas_amount_charged = gasAmountChargedByTransfer ;
17381739 executionResult . gas_cost_total =
1739- CommonUtil . getTotalGasCost ( gasPrice , executionResult . gas_amount_charged , gasPriceUnit ) ;
1740+ CommonUtil . getTotalGasCost ( gasPrice , executionResult . gas_amount_charged , gasPriceUnit , enableGasCostFlooring ) ;
17401741 if ( isDryrun || executionResult . gas_cost_total <= 0 ) {
17411742 return ;
17421743 }
0 commit comments