Skip to content

Commit

Permalink
Merge pull request bitcoin#7 from dooglus/defaultcoin
Browse files Browse the repository at this point in the history
Defaultcoin
  • Loading branch information
l0rdicon committed Oct 20, 2018
2 parents f1f88be + 51e1ddb commit 94bef30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/amount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CAmount CFeeRate::GetFee(size_t nBytes_) const
assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
int64_t nSize = int64_t(nBytes_);

CAmount nFee = nSatoshisPerK * nSize / 1000;
CAmount nFee = (1 + nSize / 1000) * nSatoshisPerK;

if (nFee == 0 && nSize != 0) {
if (nSatoshisPerK > 0)
Expand Down
1 change: 1 addition & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C

CAmount mempoolRejectFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFee(nSize);
if (mempoolRejectFee > 0 && nModifiedFees < mempoolRejectFee) {
LogPrintf("AcceptToMemoryPoolWorker : not enough fees (%d < %d)\n", nFees, mempoolRejectFee);
return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "mempool min fee not met", false, strprintf("%d < %d", nFees, mempoolRejectFee));
} else if (GetBoolArg("-relaypriority", DEFAULT_RELAYPRIORITY) && nModifiedFees < ::minRelayTxFee.GetFee(nSize) && !AllowFree(entry.GetPriority(chainActive.Height() + 1))) {
// Require that free transactions have sufficient priority to be mined in the next block.
Expand Down

0 comments on commit 94bef30

Please sign in to comment.