Skip to content

Commit 9fa391c

Browse files
authored
Merge pull request #207 from j-berman/no-drop-dbl-spend-stressnet
tx pool: don't drop cxns relaying key images spent in chain [stressnet]
2 parents 3f35465 + 00927dc commit 9fa391c

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
@@ -3836,7 +3836,7 @@ bool Blockchain::check_tx_inputs(transaction& tx,
38363836

38373837
if(have_tx_keyimg_as_spent(in_to_key.k_image))
38383838
{
3839-
MERROR_VER("Key image already spent in blockchain: " << epee::string_tools::pod_to_hex(in_to_key.k_image));
3839+
MERROR_VER("Transaction " << get_transaction_hash(tx) << "spends key image already spent in blockchain: " << epee::string_tools::pod_to_hex(in_to_key.k_image));
38403840
tvc.m_double_spend = true;
38413841
return false;
38423842
}

src/cryptonote_core/tx_pool.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ namespace cryptonote
273273
LOG_PRINT_L1("tx used wrong inputs, rejected");
274274
tvc.m_verifivation_failed = true;
275275
tvc.m_invalid_input = true;
276+
if (tvc.m_double_spend)
277+
tvc.m_no_drop_offense = true;
276278
return false;
277279
}
278280
}else

0 commit comments

Comments
 (0)