Prepare compact blob for block broadcasts

Reference transactions by index in the parent block instead of storing full 32 bytes per transaction
This commit is contained in:
SChernykh
2022-11-09 11:17:35 +01:00
parent bbc3d44526
commit c135787620
3 changed files with 41 additions and 5 deletions
+2 -1
View File
@@ -130,7 +130,7 @@ public:
std::atomic<uint32_t> m_broadcastedHashesIndex{ 0 };
};
void broadcast(const PoolBlock& block);
void broadcast(const PoolBlock& block, const PoolBlock* parent);
uint64_t get_random64();
uint64_t get_peerId() const { return m_peerId; }
@@ -212,6 +212,7 @@ private:
{
std::vector<uint8_t> blob;
std::vector<uint8_t> pruned_blob;
std::vector<uint8_t> compact_blob;
std::vector<hash> ancestor_hashes;
};