diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-20 13:09:18 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-20 13:09:18 -0800 |
commit | 781c06c0f534913321a415a4fb64a60734e43101 (patch) | |
tree | f2d96b0c74da35b701513a629817c7e944798827 /src/main.h | |
parent | 595925592d36fb5d5d34beea3c3e71fca2b6726e (diff) | |
parent | dbbf1d4a48c8761a67a4477bef48f17c0badef7b (diff) |
Merge pull request #677 from luke-jr/minfee_modes
API: GetMinFee modes
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h index 4543065d72..d613d284b6 100644 --- a/src/main.h +++ b/src/main.h @@ -393,6 +393,13 @@ public: +enum GetMinFee_mode +{ + GMF_BLOCK, + GMF_RELAY, + GMF_SEND, +}; + // // The basic transaction that is broadcasted on the network and contained in // blocks. A transaction can contain multiple inputs and outputs. @@ -515,10 +522,10 @@ public: return dPriority > COIN * 144 / 250; } - int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, bool fForRelay=false) const + int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const { // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE - int64 nBaseFee = fForRelay ? MIN_RELAY_TX_FEE : MIN_TX_FEE; + int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE; unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK); unsigned int nNewBlockSize = nBlockSize + nBytes; |