aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2011-10-03 12:55:47 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2011-12-14 01:07:43 -0500
commitdbbf1d4a48c8761a67a4477bef48f17c0badef7b (patch)
tree86c34a2d373dd816cd13d48d21a1505d5c227737 /src/main.h
parenta880b29cab0fe95161b54b61159321021d5a3219 (diff)
downloadbitcoin-dbbf1d4a48c8761a67a4477bef48f17c0badef7b.tar.xz
GetMinFee takes a mode parameter (GMF_{BLOCK,RELAY,SEND}) instead of fForRelay
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h
index c400145d01..a699331884 100644
--- a/src/main.h
+++ b/src/main.h
@@ -387,6 +387,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.
@@ -523,10 +530,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;