Summary or problem description
The way that CalculateNetworkFee parameters are and using extension method is not the easy nor the best way of getting the networkFee. It requires WAY to much overhead. Same calculating for TransactionAttribute.CalculateNetworkFee.
public static long CalculateNetworkFee(
this Transaction tx,
DataCache snapshot,
ProtocolSettings settings,
Func<UInt160, byte[]> accountScript,
long maxExecutionCost = ApplicationEngine.TestModeGas);
Do you have any solution you want to propose?
Create different ambiguous methods for CalculateNetworkFee.
Recommended Methods:
// Throw exception when 'contract' is signer
public static long CalculateNetworkFee(this Transaction tx, long exec_fee_factor);
// Does what it does now
public static long CalculateNetworkFee(this Transaction tx, DataCache snapshot, ProtocolSettings settings);
Where in the software does this update applies to?
Summary or problem description
The way that
CalculateNetworkFeeparameters are and using extension method is not the easy nor the best way of getting thenetworkFee. It requires WAY to much overhead. Same calculating forTransactionAttribute.CalculateNetworkFee.Do you have any solution you want to propose?
Create different ambiguous methods for
CalculateNetworkFee.Recommended Methods:
Where in the software does this update applies to?