core: notify the txpool when transactions are relayed
This commit is contained in:
@@ -709,6 +709,20 @@ namespace cryptonote
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
void core::on_transaction_relayed(const cryptonote::blobdata& tx_blob)
|
||||
{
|
||||
std::list<std::pair<crypto::hash, cryptonote::transaction>> txs;
|
||||
cryptonote::transaction tx;
|
||||
crypto::hash tx_hash, tx_prefix_hash;
|
||||
if (!parse_and_validate_tx_from_blob(tx_blob, tx, tx_hash, tx_prefix_hash))
|
||||
{
|
||||
LOG_ERROR("Failed to parse relayed tranasction");
|
||||
return;
|
||||
}
|
||||
txs.push_back(std::make_pair(tx_hash, std::move(tx)));
|
||||
m_mempool.set_relayed(txs);
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, const blobdata& ex_nonce)
|
||||
{
|
||||
return m_blockchain_storage.create_block_template(b, adr, diffic, height, ex_nonce);
|
||||
|
||||
Reference in New Issue
Block a user