Skip to content

Commit

Permalink
Merge pull request #4342 from harmony-one/dev
Browse files Browse the repository at this point in the history
Mainnet Release Candidate 4.3.14-rc3 (dev -> main)
  • Loading branch information
sophoah committed Jan 23, 2023
2 parents 20e4892 + dd6d0ee commit 09dba41
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
12 changes: 6 additions & 6 deletions internal/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ var (
DataCopyFixEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
IstanbulEpoch: big.NewInt(314),
ReceiptLogEpoch: big.NewInt(101),
SHA3Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
HIP6And8Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
StakingPrecompileEpoch: big.NewInt(871), // Around Tue Feb 11 2022
ChainIdFixEpoch: EpochTBD,
SlotsLimitedEpoch: big.NewInt(999), // Around Fri, 27 May 2022 09:41:02 UTC with 2s block time
CrossShardXferPrecompileEpoch: EpochTBD,
SHA3Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
HIP6And8Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
StakingPrecompileEpoch: big.NewInt(871), // Around Tue Feb 11 2022
ChainIdFixEpoch: big.NewInt(1323), // Around Wed 8 Feb 11:30PM UTC
SlotsLimitedEpoch: big.NewInt(999), // Around Fri, 27 May 2022 09:41:02 UTC with 2s block time
CrossShardXferPrecompileEpoch: big.NewInt(1323), // Around Wed 8 Feb 11:30PM UTC
AllowlistEpoch: EpochTBD,
FeeCollectEpoch: EpochTBD,
}
Expand Down
19 changes: 12 additions & 7 deletions rpc/harmony.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,24 @@ func (s *PublicHarmonyService) ProtocolVersion(
}

// Syncing returns false in case the node is in sync with the network
// With the current network height as well as the difference
// If it is syncing, it returns:
// starting block, current block, and network height
func (s *PublicHarmonyService) Syncing(
ctx context.Context,
) (interface{}, error) {
// difference = target - current
inSync, target, difference := s.hmy.NodeAPI.SyncStatus(s.hmy.ShardID)
if inSync {
return false, nil
}
return struct {
InSync bool `json:"in-sync"`
Target uint64 `json:"network-height"`
Delta uint64 `json:"difference"`
Start uint64 `json:"startingBlock"`
Current uint64 `json:"currentBlock"`
Target uint64 `json:"highestBlock"`
}{
InSync: inSync,
Target: target,
Delta: difference,
// Start: 0, // TODO
Current: target - difference,
Target: target,
}, nil
}

Expand Down

0 comments on commit 09dba41

Please sign in to comment.