Skip to content

Commit 2d48637

Browse files
committed
tx pool: don't drop cxns relaying key images spent in chain
1 parent dbf9ff3 commit 2d48637

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cryptonote_core/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3759,7 +3759,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
37593759

37603760
if(have_tx_keyimg_as_spent(in_to_key.k_image))
37613761
{
3762-
MERROR_VER("Key image already spent in blockchain: " << epee::string_tools::pod_to_hex(in_to_key.k_image));
3762+
MERROR_VER("Key image already spent in blockchain: " << epee::string_tools::pod_to_hex(in_to_key.k_image) << " of tx " << get_transaction_hash(tx));
37633763
tvc.m_double_spend = true;
37643764
return false;
37653765
}

src/cryptonote_core/tx_pool.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ namespace cryptonote
270270
LOG_PRINT_L1("tx used wrong inputs, rejected");
271271
tvc.m_verifivation_failed = true;
272272
tvc.m_invalid_input = true;
273+
if (tvc.m_double_spend)
274+
tvc.m_no_drop_offense = true;
273275
return false;
274276
}
275277
}else

0 commit comments

Comments
 (0)