1
0
Fork 0
forked from lthn/blockchain

minor fix for sequence factor comparison in on_get_pos_mining_details()

This commit is contained in:
sowle 2023-08-09 13:48:36 +02:00
parent a6036e2a13
commit 035f82f605
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
3 changed files with 3 additions and 3 deletions

View file

@ -159,7 +159,7 @@
#else
# define BLOCKCHAIN_HEIGHT_FOR_POS_STRICT_SEQUENCE_LIMITATION 18000
#endif
#define BLOCK_POS_STRICT_SEQUENCE_LIMIT 20
#define BLOCK_POS_STRICT_SEQUENCE_LIMIT 20 // the highest allowed sequence factor for a PoS block (i.e., the max total number of sequential PoS blocks is BLOCK_POS_STRICT_SEQUENCE_LIMIT + 1)
#define WALLET_FILE_SIGNATURE_OLD 0x1111012101101011LL // Bender's nightmare

View file

@ -543,7 +543,7 @@ namespace currency
res.pos_sequence_factor_is_good = true;
uint64_t new_block_expected_height = m_core.get_blockchain_storage().get_top_block_height() + 1;
size_t new_block_expected_sequence_factor = m_core.get_blockchain_storage().get_current_sequence_factor(true) + 1;
size_t new_block_expected_sequence_factor = m_core.get_blockchain_storage().get_current_sequence_factor(true);
if (new_block_expected_height > BLOCKCHAIN_HEIGHT_FOR_POS_STRICT_SEQUENCE_LIMITATION && new_block_expected_sequence_factor > BLOCK_POS_STRICT_SEQUENCE_LIMIT)
res.pos_sequence_factor_is_good = false;

View file

@ -4281,7 +4281,7 @@ bool wallet2::try_mint_pos(const currency::account_public_address& miner_address
if (!ctx.is_pos_sequence_factor_good)
{
WLT_LOG_YELLOW("PoS sequence factor is too big, waiting for a PoW block...", LOG_LEVEL_0);
WLT_LOG_YELLOW("PoS sequence factor is too high, waiting for a PoW block...", LOG_LEVEL_0);
return true;
}