Use fee/priority estimates in wallet CreateTransaction
The wallet now uses the mempool fee estimator with a new command-line option: -txconfirmtarget (default: 1) instead of using hard-coded fees or priorities. A new bitcoind that hasn't seen enough transactions to estimate will fall back to the old hard-coded minimum priority or transaction fee. -paytxfee option overrides -txconfirmtarget. Relaying and mining code isn't changed. For Qt, the coin control dialog now uses priority estimates to label transaction priority (instead of hard-coded constants); unspent outputs were consistently labeled with a much higher priority than is justified by the free transactions actually being accepted into blocks. I did not implement any GUI for setting -txconfirmtarget; I would suggest getting rid of the "Pay transaction fee" GUI and replace it with either "target number of confirmations" or maybe a "faster confirmation <--> lower fee" slider or select box.
This commit is contained in:
@@ -245,14 +245,7 @@ struct CDiskTxPos : public CDiskBlockPos
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum GetMinFee_mode
|
||||
{
|
||||
GMF_RELAY,
|
||||
GMF_SEND,
|
||||
};
|
||||
|
||||
int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode);
|
||||
int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
|
||||
|
||||
//
|
||||
// Check transaction inputs, and make sure any
|
||||
|
||||
Reference in New Issue
Block a user