|
12 | 12 |
|
13 | 13 | #include "addrman.h" |
14 | 14 | #include "alert.h" |
| 15 | +#include "amount.h" |
15 | 16 | #include "blocksignature.h" |
16 | 17 | #include "chainparams.h" |
17 | 18 | #include "checkpoints.h" |
@@ -930,11 +931,6 @@ int GetIXConfirmations(uint256 nTXHash) |
930 | 931 | return 0; |
931 | 932 | } |
932 | 933 |
|
933 | | -bool MoneyRange(CAmount nValueOut) |
934 | | -{ |
935 | | - return nValueOut >= 0 && nValueOut <= Params().MaxMoneyOut(); |
936 | | -} |
937 | | - |
938 | 934 | bool CheckZerocoinMint(const uint256& txHash, const CTxOut& txout, CValidationState& state, bool fCheckOnly) |
939 | 935 | { |
940 | 936 | libzerocoin::PublicCoin pubCoin(Params().Zerocoin_Params(false)); |
@@ -1164,7 +1160,7 @@ bool CheckTransaction(const CTransaction& tx, bool fZerocoinActive, bool fReject |
1164 | 1160 | if (txout.nValue < 0) |
1165 | 1161 | return state.DoS(100, error("CheckTransaction() : txout.nValue negative"), |
1166 | 1162 | REJECT_INVALID, "bad-txns-vout-negative"); |
1167 | | - if (txout.nValue > Params().MaxMoneyOut()) |
| 1163 | + if (txout.nValue > MAX_MONEY_OUT) |
1168 | 1164 | return state.DoS(100, error("CheckTransaction() : txout.nValue too high"), |
1169 | 1165 | REJECT_INVALID, "bad-txns-vout-toolarge"); |
1170 | 1166 | nValueOut += txout.nValue; |
@@ -1302,7 +1298,7 @@ CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF |
1302 | 1298 | } |
1303 | 1299 |
|
1304 | 1300 | if (!MoneyRange(nMinFee)) |
1305 | | - nMinFee = Params().MaxMoneyOut(); |
| 1301 | + nMinFee = MAX_MONEY_OUT; |
1306 | 1302 | return nMinFee; |
1307 | 1303 | } |
1308 | 1304 |
|
|
0 commit comments