mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Updating hpfs log index on ledger creation (#274)
This commit is contained in:
@@ -159,6 +159,13 @@ namespace ledger
|
||||
// Update the last shard hash and shard seqence number tracker when a new ledger is created.
|
||||
ctx.set_last_primary_shard_id(p2p::sequence_hash{primary_shard_seq_no, last_primary_shard_hash});
|
||||
|
||||
// Update the hpfs log index file only in full history mode.
|
||||
if (conf::cfg.node.history == conf::HISTORY::FULL && sc::contract_fs.update_hpfs_log_index() == -1)
|
||||
{
|
||||
LOG_ERROR << errno << ": Error updating the log index file.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Remove old shards that exceeds max shard range.
|
||||
if (conf::cfg.node.history == conf::HISTORY::CUSTOM && primary_shard_seq_no >= conf::cfg.node.history_config.max_primary_shards)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user