2
0
mirror of https://github.com/status-im/status-go.git synced 2025-02-26 13:45:34 +00:00
2020-01-06 10:17:23 +01:00

19 lines
373 B
Go

package verifier
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/p2p/enode"
)
func TestLocalVerifierForNodeIDTypes(t *testing.T) {
nodeID := enode.ID{1}
v := NewLocalVerifier([]enode.ID{{1}})
require.True(t, v.VerifyNode(context.TODO(), nodeID))
require.False(t, v.VerifyNode(context.TODO(), enode.ID{2}))
}