Drop default tx fee/kB to 0.00001 BTC.
This matches the recent change made to bitcoin core wallet, and follows roughly a year after the minimum mempool relay fee/kB was dropped to the same value.
This commit is contained in:
parent
df3779f780
commit
b55a9ed7ca
2 changed files with 5 additions and 5 deletions
|
@ -99,9 +99,9 @@ var ErrNonPositiveAmount = errors.New("amount is not positive")
|
|||
// negative.
|
||||
var ErrNegativeFee = errors.New("fee is negative")
|
||||
|
||||
// defaultFeeIncrement is the default minimum transation fee (0.0001 BTC,
|
||||
// defaultFeeIncrement is the default minimum transation fee (0.00001 BTC,
|
||||
// measured in satoshis) added to transactions requiring a fee.
|
||||
const defaultFeeIncrement = 10000
|
||||
const defaultFeeIncrement = 1e3
|
||||
|
||||
type CreatedTx struct {
|
||||
tx *btcutil.Tx
|
||||
|
|
|
@ -93,14 +93,14 @@ func TestCreateTx(t *testing.T) {
|
|||
|
||||
// Given the input (15e6 + 10e6 + 1e7) and requested output (15e6 + 10e6)
|
||||
// amounts in the new TX, we should have a change output with 8.99e6, which
|
||||
// implies a fee of 1e4 satoshis.
|
||||
expectedChange := btcutil.Amount(8.99e6)
|
||||
// implies a fee of 1e3 satoshis.
|
||||
expectedChange := btcutil.Amount(8.999e6)
|
||||
|
||||
outputs[changeAddr.String()] = expectedChange
|
||||
checkOutputsMatch(t, msgTx, outputs)
|
||||
|
||||
minFee := feeForSize(defaultFeeIncrement, msgTx.SerializeSize())
|
||||
actualFee := btcutil.Amount(1e4)
|
||||
actualFee := btcutil.Amount(1e3)
|
||||
if minFee > actualFee {
|
||||
t.Fatalf("Requested fee (%v) for tx size higher than actual fee (%v)", minFee, actualFee)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue