aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/enr/enr_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/enr/enr_test.go')
-rw-r--r--p2p/enr/enr_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/p2p/enr/enr_test.go b/p2p/enr/enr_test.go
index 9bf22478d..449c898a8 100644
--- a/p2p/enr/enr_test.go
+++ b/p2p/enr/enr_test.go
@@ -169,6 +169,18 @@ func TestDirty(t *testing.T) {
}
}
+func TestSeq(t *testing.T) {
+ var r Record
+
+ assert.Equal(t, uint64(0), r.Seq())
+ r.Set(UDP(1))
+ assert.Equal(t, uint64(0), r.Seq())
+ signTest([]byte{5}, &r)
+ assert.Equal(t, uint64(0), r.Seq())
+ r.Set(UDP(2))
+ assert.Equal(t, uint64(1), r.Seq())
+}
+
// TestGetSetOverwrite tests value overwrite when setting a new value with an existing key in record.
func TestGetSetOverwrite(t *testing.T) {
var r Record