Skip to content

Commit

Permalink
Merge bitcoin#13032: Output values for "min relay fee not met" error
Browse files Browse the repository at this point in the history
1accfbc Output values for "min relay fee not met" error (Kristaps Kaupe)

Pull request description:

  It is already done this way for "mempool min fee not met" error.

Tree-SHA512: 829db78ecc066cf93b8e93ff1aeb4e7b98883cf45f341d5be6e6b4dff4135f3f54fa49b3a6f12eb43f676a9ba54f981143c9887f786881e584370434a9566cfd
  • Loading branch information
laanwj authored and PastaPastaPasta committed Nov 10, 2020
1 parent effe6d1 commit 908ee2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool

// No transactions are allowed below minRelayTxFee except from disconnected blocks
if (!bypass_limits && nModifiedFees < ::minRelayTxFee.GetFee(nSize)) {
return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "min relay fee not met");
return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "min relay fee not met", false, strprintf("%d < %d", nModifiedFees, ::minRelayTxFee.GetFee(nSize)));
}

if (nAbsurdFee && nFees > nAbsurdFee)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/mining_prioritisetransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def run_test(self):
tx_id = self.nodes[0].decoderawtransaction(tx_hex)["txid"]

# This will raise an exception due to min relay fee not being met
assert_raises_rpc_error(-26, "min relay fee not met (code 66)", self.nodes[0].sendrawtransaction, tx_hex)
assert_raises_rpc_error(-26, "min relay fee not met, 0 < 134 (code 66)", self.nodes[0].sendrawtransaction, tx_hex)
assert(tx_id not in self.nodes[0].getrawmempool())

# This is a less than 1000-byte transaction, so just set the fee
Expand Down

0 comments on commit 908ee2b

Please sign in to comment.