Files
evm/sync/statesync/trie_sync_stats_test.go
zeekay 53674e1197 fix: ensure 100% build and test success for all packages
- Fixed pqcrypto ML-KEM/ML-DSA API compatibility with latest crypto library
- Fixed selector collision in pqcrypto precompile (mlkem_encapsulate vs mlkem_decapsulate)
- Fixed warp signer interface adapter for EVM plugin
- All tests now pass successfully
- 100% build success across node, geth, and evm packages
2025-08-24 02:56:56 +00:00

27 lines
567 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package statesync
import (
"testing"
"time"
"github.com/luxfi/geth/metrics"
"github.com/stretchr/testify/require"
)
func TestETAShouldNotOverflow(t *testing.T) {
require := require.New(t)
now := time.Now()
start := now.Add(-6 * time.Hour)
stats := &trieSyncStats{
triesStartTime: start,
triesSynced: 100_000,
triesRemaining: 450_000,
leafsRateGauge: metrics.NewGauge(),
}
require.Positive(stats.updateETA(time.Minute, now))
}