implementation of yield_info function

This commit is contained in:
Some Random Crypto Guy
2024-05-14 14:23:31 +01:00
parent b0ce6d2969
commit ae28c7a900
12 changed files with 179 additions and 25 deletions

View File

@@ -400,7 +400,7 @@ uint64_t BlockchainDB::add_block( const std::pair<block, blobdata>& blck
} else {
// Prior to activation of conversions, the staking reward is purely a percentage of the block reward
if (blk.miner_tx.amount_burnt == 0)
if (blk.miner_tx.amount_burnt == 0 and prev_height != 0)
throw std::runtime_error("Staking reward is zero, but block reward is present");
slippage_total = blk.miner_tx.amount_burnt;
}

View File

@@ -197,14 +197,6 @@ struct txpool_tx_meta_t
}
};
typedef struct yield_block_info {
uint64_t block_height;
uint64_t slippage_total_this_block;
uint64_t locked_coins_this_block;
uint64_t locked_coins_tally;
uint8_t network_health_percentage;
} yield_block_info;
typedef struct yield_tx_info {
uint64_t block_height;
crypto::hash tx_hash;