From b54e19d00e7aa9b8815684d821f6d5ecc17096e1 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 13 Mar 2017 19:16:25 +0000 Subject: [PATCH] protocol: fix wrong tx being looked up from fluffy block Found by smooth --- .../cryptonote_protocol_handler.inl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index bb242c5f..79578a34 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -548,7 +548,16 @@ namespace cryptonote tx_ids.push_back(tx_hash); if (m_core.get_transactions(tx_ids, txes, missing) && missing.empty()) { - have_tx.push_back(tx_to_blob(tx)); + if (txes.size() == 1) + { + have_tx.push_back(tx_to_blob(txes.front())); + } + else + { + MERROR("1 tx requested, none not found, but " << txes.size() << " returned"); + m_core.resume_mine(); + return 1; + } } else {