Skip to content

Commit

Permalink
policy: Don't reject Ephemeral dust tx due to non-TRUC
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Jul 18, 2024
1 parent 5675cb2 commit 9494324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/policy/truc_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,6 @@ bool CheckValidEphemeralTx(const CTransaction& tx, CFeeRate dust_relay_fee, CAmo
// No dust; it's complete standard already
if (!has_dust) return true;

// Makes spending checks inference simple via topology restrictions,
// can be relaxed if spending checks can be done easier in future.
if (tx.version != TRUC_VERSION) {
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, "dust");
}

// We never want to give incentives to mine this alone
if (txfee != 0) {
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, "dust");
Expand Down
5 changes: 2 additions & 3 deletions test/functional/mempool_ephemeral_dust.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ def test_nonzero_dust(self):
self.generate(self.nodes[0], 1)
assert_equal(self.nodes[0].getrawmempool(), [])


def test_non_truc(self):
self.log.info("Test that v2 dust-having transaction is rejected even if spent")
self.log.info("Test that v2 dust-having transaction is rejected even if spent, because of min relay requirement")

assert_equal(self.nodes[0].getrawmempool(), [])

Expand All @@ -223,7 +222,7 @@ def test_non_truc(self):

res = self.nodes[0].submitpackage([dusty_tx["hex"], sweep_tx["hex"]])
assert_equal(res["package_msg"], "transaction failed")
assert_equal(res["tx-results"][dusty_tx["wtxid"]]["error"], "dust")
assert_equal(res["tx-results"][dusty_tx["wtxid"]]["error"], "min relay fee not met, 0 < 147")

assert_equal(self.nodes[0].getrawmempool(), [])

Expand Down

0 comments on commit 9494324

Please sign in to comment.