mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Fix calculateFeeLimits nil handling
This commit is contained in:
parent
2b1d3a1a04
commit
8e8f7c9b32
@ -43,6 +43,11 @@ func (s *server) CreateUnsignedTransactions(_ context.Context, request *pb.Creat
|
||||
func (s *server) calculateFeeLimits(requestFeePolicy *pb.FeePolicy) (feeRate float64, maxFee uint64, err error) {
|
||||
feeRate = minFeeRate
|
||||
maxFee = math.MaxUint64
|
||||
|
||||
if requestFeePolicy == nil {
|
||||
requestFeePolicy = &pb.FeePolicy{}
|
||||
}
|
||||
|
||||
switch requestFeePolicy := requestFeePolicy.FeePolicy.(type) {
|
||||
case *pb.FeePolicy_ExactFeeRate:
|
||||
feeRate = requestFeePolicy.ExactFeeRate
|
||||
|
@ -90,7 +90,7 @@ func parse(conf *parseConfig) error {
|
||||
fmt.Println()
|
||||
|
||||
fee := allInputSompi - allOutputSompi
|
||||
fmt.Printf("Fee:\t%d Sompi\n\n", fee)
|
||||
fmt.Printf("Fee:\t%d Sompi (%f KAS)\n\n", fee, float64(fee)/float64(constants.SompiPerKaspa))
|
||||
mass, err := server.EstimateMassAfterSignatures(partiallySignedTransaction, keysFile.ECDSA, keysFile.MinimumSignatures, txMassCalculator)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -17,7 +17,7 @@ const (
|
||||
// appBuild is defined as a variable so it can be overridden during the build
|
||||
// process with '-ldflags "-X github.com/kaspanet/kaspad/version.appBuild=foo"' if needed.
|
||||
// It MUST only contain characters from validCharacters.
|
||||
var appBuild string = "rc3"
|
||||
var appBuild string = "rc5"
|
||||
|
||||
var version = "" // string used for memoization of version
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user