mirror of
https://github.com/luxfi/bft.git
synced 2026-10-30 17:01:54 +00:00
Split root package into common/ and simplex/ packages
Move the files that lived at the repository root into dedicated
packages and update all import paths and package declarations to match.
No behavioral changes — this is a pure relocation/refactor.
- common/: shared protocol types and helpers (api, blacklist, encoding,
global, metadata, msg, notarization) plus their tests.
- simplex/: the Simplex protocol implementation (epoch, block scheduler, monitor,
replication, requestor, sched, timeout handler, util) plus their tests
and the long-running/fuzz/recovery/pos test suites.
Will now be instantiated as: "simplex.Epoch" as it should.
Update references in the msm, testutil, and wal packages to point at the
new locations.
Signed-off-by: Yacov Manevich <[email protected]>
27 lines
500 B
Go
27 lines
500 B
Go
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package common
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestNodeIDs(t *testing.T) {
|
|
nodeIDs := NodeIDs{
|
|
{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
|
|
}
|
|
|
|
for i := range nodeIDs {
|
|
require.NotContains(t, nodeIDs, nodeIDs.Remove(nodeIDs[i]))
|
|
for j := range nodeIDs {
|
|
if i == j {
|
|
continue
|
|
}
|
|
require.Contains(t, nodeIDs, nodeIDs[j])
|
|
}
|
|
}
|
|
}
|