类 TransactionFeeCalculator
- java.lang.Object
-
- network.nerve.base.basic.TransactionFeeCalculator
-
public class TransactionFeeCalculator extends Object
- 作者:
- tag 2018/11/27
-
-
字段概要
字段 修饰符和类型 字段 说明 static BigIntegerCROSSTX_PRICE_PRE_1024_BYTESstatic intKBstatic BigIntegerNORMAL_PRICE_PRE_1024_BYTES
-
构造器概要
构造器 构造器 说明 TransactionFeeCalculator()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static BigIntegergetConsensusTxFee(int size, long unit)根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.static BigIntegergetCrossTxFee(int size)根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.static BigIntegergetFee(int size, BigInteger price)根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.static BigIntegergetNormalTxFee(int size)根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.static BigIntegergetNormalUnsignedTxFee(int size)根据未签名的交易大小计算需要交纳的手续费
-
-
-
字段详细资料
-
NORMAL_PRICE_PRE_1024_BYTES
public static final BigInteger NORMAL_PRICE_PRE_1024_BYTES
-
CROSSTX_PRICE_PRE_1024_BYTES
public static final BigInteger CROSSTX_PRICE_PRE_1024_BYTES
-
KB
public static final int KB
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getNormalTxFee
public static final BigInteger getNormalTxFee(int size)
根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.- 参数:
size- 交易大小/size of the transaction
-
getConsensusTxFee
public static final BigInteger getConsensusTxFee(int size, long unit)
根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.- 参数:
size- 交易大小/size of the transaction
-
getNormalUnsignedTxFee
public static final BigInteger getNormalUnsignedTxFee(int size)
根据未签名的交易大小计算需要交纳的手续费- 参数:
size- 未签名的交易大小/ size of the unsigned transaction- 返回:
- 交易手续费
-
getCrossTxFee
public static final BigInteger getCrossTxFee(int size)
根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.- 参数:
size- 交易大小/size of the transaction
-
getFee
public static final BigInteger getFee(int size, BigInteger price)
根据交易大小计算需要交纳的手续费 According to the transaction size calculate the handling fee.- 参数:
size- 交易大小/size of the transaction
-
-