|
|
|
@ -909,7 +909,7 @@ namespace cryptonote
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const size_t weight = get_transaction_weight(results[i].tx, it->size());
|
|
|
|
|
ok &= add_new_tx(results[i].tx, results[i].hash, results[i].prefix_hash, weight, tvc[i], keeped_by_block, relayed, do_not_relay);
|
|
|
|
|
ok &= add_new_tx(results[i].tx, results[i].hash, tx_blobs[i], results[i].prefix_hash, weight, tvc[i], keeped_by_block, relayed, do_not_relay);
|
|
|
|
|
if(tvc[i].m_verifivation_failed)
|
|
|
|
|
{MERROR_VER("Transaction verification failed: " << results[i].hash);}
|
|
|
|
|
else if(tvc[i].m_verifivation_impossible)
|
|
|
|
@ -1127,7 +1127,7 @@ namespace cryptonote
|
|
|
|
|
blobdata bl;
|
|
|
|
|
t_serializable_object_to_blob(tx, bl);
|
|
|
|
|
size_t tx_weight = get_transaction_weight(tx, bl.size());
|
|
|
|
|
return add_new_tx(tx, tx_hash, tx_prefix_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay);
|
|
|
|
|
return add_new_tx(tx, tx_hash, bl, tx_prefix_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay);
|
|
|
|
|
}
|
|
|
|
|
//-----------------------------------------------------------------------------------------------
|
|
|
|
|
size_t core::get_blockchain_total_transactions() const
|
|
|
|
@ -1135,7 +1135,7 @@ namespace cryptonote
|
|
|
|
|
return m_blockchain_storage.get_total_transactions();
|
|
|
|
|
}
|
|
|
|
|
//-----------------------------------------------------------------------------------------------
|
|
|
|
|
bool core::add_new_tx(transaction& tx, const crypto::hash& tx_hash, const crypto::hash& tx_prefix_hash, size_t tx_weight, tx_verification_context& tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
|
|
|
|
|
bool core::add_new_tx(transaction& tx, const crypto::hash& tx_hash, const cryptonote::blobdata &blob, const crypto::hash& tx_prefix_hash, size_t tx_weight, tx_verification_context& tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
|
|
|
|
|
{
|
|
|
|
|
if (keeped_by_block)
|
|
|
|
|
get_blockchain_storage().on_new_tx_from_block(tx);
|
|
|
|
@ -1153,7 +1153,7 @@ namespace cryptonote
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t version = m_blockchain_storage.get_current_hard_fork_version();
|
|
|
|
|
return m_mempool.add_tx(tx, tx_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay, version);
|
|
|
|
|
return m_mempool.add_tx(tx, tx_hash, blob, tx_weight, tvc, keeped_by_block, relayed, do_not_relay, version);
|
|
|
|
|
}
|
|
|
|
|
//-----------------------------------------------------------------------------------------------
|
|
|
|
|
bool core::relay_txpool_transactions()
|
|
|
|
|