aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-10 11:07:29 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-10 11:08:02 +0000
commitabd376313bb5fd82df622901b11adf1e1bccd03b (patch)
tree312eb298610e5400f8f5641cccb77fa5341c361c /src/cryptonote_core
parentMerge pull request #5915 (diff)
downloadmonero-abd376313bb5fd82df622901b11adf1e1bccd03b.tar.xz
cryptonote: fill in tx weight when syncing from pruned blocks
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index b831cc9ff..e54f3d053 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1027,11 +1027,7 @@ namespace cryptonote
if (already_have[i])
continue;
- // if it's a pruned tx from an incoming block, we'll get a weight that's technically
- // different from the actual transaction weight, but it's OK for our use. Those txes
- // will be ignored when mining, and using that "pruned" weight seems appropriate for
- // keeping the txpool size constrained
- const uint64_t weight = results[i].tx.pruned ? 0 : get_transaction_weight(results[i].tx, it->blob.size());
+ const uint64_t weight = results[i].tx.pruned ? get_pruned_transaction_weight(results[i].tx) : get_transaction_weight(results[i].tx, it->blob.size());
ok &= add_new_tx(results[i].tx, results[i].hash, tx_blobs[i].blob, weight, tvc[i], keeped_by_block, relayed, do_not_relay);
if(tvc[i].m_verifivation_failed)
{MERROR_VER("Transaction verification failed: " << results[i].hash);}