aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-03-02 16:27:24 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-03-02 16:27:24 -0500
commit395c1f44bd480416a12c881c89721e72ab40ee32 (patch)
treead062f8dd6980c8e00dc474f2dcc77a83e882a96 /main.h
parent411493b1f70d1493b1203bce847baa9f41e79f91 (diff)
Fix minimum transaction fee calculation mismatch between CreateTransaction and CreateBlock
Diffstat (limited to 'main.h')
-rw-r--r--main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.h b/main.h
index a7ef336e00..668d7f98b3 100644
--- a/main.h
+++ b/main.h
@@ -574,6 +574,13 @@ public:
return nValueOut;
}
+ static bool AllowFree(double dPriority)
+ {
+ // Large (in bytes) low-priority (new, small-coin) transactions
+ // need a fee.
+ return dPriority > COIN * 144 / 250;
+ }
+
int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true) const
{
// Base fee is 1 cent per kilobyte
@@ -998,6 +1005,7 @@ public:
{
return !(a == b);
}
+ int GetDepthInMainChain() const;
};