BlockTemplate code refactoring

- Moved block constants to one place
- Tuned block template max transaction limiter
This commit is contained in:
SChernykh
2023-04-21 11:09:57 +02:00
parent 44d2005ab1
commit 8bf045974f
5 changed files with 41 additions and 21 deletions
+6
View File
@@ -47,6 +47,12 @@ class SideChain;
* Pool block's PoW hash is calculated from the Monero block template part using Monero's consensus rules
*/
// 128 KB minus BLOCK_RESPONSE P2P protocol header (5 bytes)
static constexpr uint64_t MAX_BLOCK_SIZE = 128 * 1024 - 5;
// 0.6 XMR
static constexpr uint64_t BASE_BLOCK_REWARD = 600000000000ULL;
struct DifficultyData
{
FORCEINLINE DifficultyData(uint64_t t, const difficulty_type& d) : m_timestamp(t), m_cumulativeDifficulty(d) {}