protocol: request txpool contents when synced

A newly synced Alice sends a (typically quite small) list of
txids in the local tpxool to a random peer Bob, who then uses
the existing tx relay system to send Alice any tx in his txpool
which is not in the list Alice sent
This commit is contained in:
moneromooo-monero 2019-11-27 00:09:25 +00:00
parent d1cf16364f
commit 054b4c7f41
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 147 additions and 0 deletions

View file

@ -353,5 +353,23 @@ namespace cryptonote
};
typedef epee::misc_utils::struct_init<request_t> request;
};
/************************************************************************/
/* */
/************************************************************************/
struct NOTIFY_GET_TXPOOL_COMPLEMENT
{
const static int ID = BC_COMMANDS_POOL_BASE + 10;
struct request_t
{
std::vector<crypto::hash> hashes;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(hashes)
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<request_t> request;
};
}