func (rate nanoSoterPerByte) Fee(size uint32) soterutil.Amount {
	if rate == nanoSoterPerByte(-1) {
		return soterutil.Amount(-1)
	}
	return soterutil.Amount(float64(rate) * float64(size))
}
Fee returns the fee for a transaction of a given size for
the given fee rate.
package mempool
import (
	"bytes"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"math"
	"math/rand"
	"sort"
	"strings"
	"sync"
	"github.com/soteria-dag/soterd/chaincfg/chainhash"
	"github.com/soteria-dag/soterd/miningdag"
	"github.com/soteria-dag/soterd/soterutil"
)
const (
	estimateFeeDepth = 25
	estimateFeeBinSize = 100
	estimateFeeMaxReplacements = 10
	DefaultEstimateFeeMaxRollback = 2
	DefaultEstimateFeeMinRegisteredBlocks = 3
	bytePerKb = 1000
)
var (
	EstimateFeeDatabaseKey = []byte("estimatefee")
)
type nanoSoterPerByte float64
type SotoPerKilobyte float64
func (rate nanoSoterPerByte) ToSotoPerKb() SotoPerKilobyte {
	if rate == nanoSoterPerByte(-1.0) {
		return -1.0
	}
	return SotoPerKilobyte(float64(rate) * bytePerKb * soterutil.NanoSoter)
}