From f579c1433678dc7ff30d311dc4f414fad8dde6f2 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 8 Aug 2024 21:22:32 +0800 Subject: [PATCH] Support assume_valid_target_reached for SyncState --- types/net.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/types/net.go b/types/net.go index 519d7cb0..b5ab6697 100644 --- a/types/net.go +++ b/types/net.go @@ -54,12 +54,16 @@ type BannedAddress struct { } type SyncState struct { - Ibd bool `json:"ibd"` - BestKnownBlockNumber uint64 `json:"best_known_block_number"` - BestKnownBlockTimestamp uint64 `json:"best_known_block_timestamp"` - OrphanBlocksCount uint64 `json:"orphan_blocks_count"` - InflightBlocksCount uint64 `json:"inflight_blocks_count"` - FastTime uint64 `json:"fast_time"` - LowTime uint64 `json:"low_time"` - NormalTime uint64 `json:"normal_time"` + Ibd bool `json:"ibd"` + BestKnownBlockNumber uint64 `json:"best_known_block_number"` + BestKnownBlockTimestamp uint64 `json:"best_known_block_timestamp"` + OrphanBlocksCount uint64 `json:"orphan_blocks_count"` + InflightBlocksCount uint64 `json:"inflight_blocks_count"` + AssumeValidTarget Hash `json:"assume_valid_target"` + AssumeValidTargetReached bool `json:"assume_valid_target_reached"` + MinChainWork uint64 `json:"min_chain_work"` + MinChainWorkReached bool `json:"min_chain_work_reached"` + FastTime uint64 `json:"fast_time"` + LowTime uint64 `json:"low_time"` + NormalTime uint64 `json:"normal_time"` }