Skip to content

Commit

Permalink
Add TicketFeeIncrementTestnet
Browse files Browse the repository at this point in the history
This will fix issues with allowhighfees checking in dcrd on
testnet/simnet
  • Loading branch information
alexlyp committed Apr 20, 2016
1 parent 2a1e04c commit 5d77ddb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions wallet/createtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ const FeeIncrementTestnet = 1e3
// coin, measured in atoms).
const TicketFeeIncrement = 1e6

// TicketFeeIncrementTestnet is the default minimum stake transation fees per KB
// (0.00001 coin, measured in atoms) for Testnet.
const TicketFeeIncrementTestnet = 1e3

// EstMaxTicketFeeAmount is the estimated max ticket fee to be used for size
// calculation for eligible utxos for ticket purchasing.
const EstMaxTicketFeeAmount = 0.1 * 1e8
Expand Down
7 changes: 4 additions & 3 deletions wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,19 @@ func newWallet(vb uint16, esm bool, btm dcrutil.Amount, addressReuse bool,
}

var feeIncrement dcrutil.Amount
var ticketFeeIncrement dcrutil.Amount
switch {
case params == &chaincfg.MainNetParams:
feeIncrement = FeeIncrementMainnet
ticketFeeIncrement = TicketFeeIncrement
case params == &chaincfg.TestNetParams:
feeIncrement = FeeIncrementTestnet
ticketFeeIncrement = TicketFeeIncrementTestnet
default:
feeIncrement = FeeIncrementTestnet
ticketFeeIncrement = TicketFeeIncrementTestnet
}

var ticketFeeIncrement dcrutil.Amount
ticketFeeIncrement = TicketFeeIncrement

w := &Wallet{
db: *db,
Manager: mgr,
Expand Down

0 comments on commit 5d77ddb

Please sign in to comment.