mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 13:00:10 +00:00

* [NOD-1223] Move all network stuff into a new network package. * [NOD-1223] Delete the unused package testutil. * [NOD-1223] Move infrastructure stuff into a new instrastructure package. * [NOD-1223] Move domain stuff into a new domain package.
22 lines
544 B
Go
22 lines
544 B
Go
package blockdag
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/dagconfig"
|
|
"testing"
|
|
)
|
|
|
|
func TestIsDAGCurrentMaxDiff(t *testing.T) {
|
|
netParams := []*dagconfig.Params{
|
|
&dagconfig.MainnetParams,
|
|
&dagconfig.TestnetParams,
|
|
&dagconfig.DevnetParams,
|
|
&dagconfig.RegressionNetParams,
|
|
&dagconfig.SimnetParams,
|
|
}
|
|
for _, params := range netParams {
|
|
if params.FinalityDuration < isDAGCurrentMaxDiff*params.TargetTimePerBlock {
|
|
t.Errorf("in %s, a DAG can be considered current even if it's below the finality point", params.Name)
|
|
}
|
|
}
|
|
}
|