Skip to content

Commit 73d1092

Browse files
[ETCM-1015] Update the ForkIdSpec
1 parent f71e515 commit 73d1092

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/scala/io/iohk/ethereum/forkid/ForkIdSpec.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ForkIdSpec extends AnyWordSpec with Matchers {
2020
}
2121
"gatherForks for the etc chain correctly" in {
2222
val res = config.blockchains.map { case (name, conf) => (name, gatherForks(conf)) }
23-
res("etc") shouldBe List(1150000, 2500000, 3000000, 5000000, 5900000, 8772000, 9573000, 10500839, 11700000)
23+
res("etc") shouldBe List(1150000, 2500000, 3000000, 5000000, 5900000, 8772000, 9573000, 10500839, 11700000, 13189133)
2424
}
2525

2626
"gatherForks for the eth chain correctly" in {
@@ -78,7 +78,9 @@ class ForkIdSpec extends AnyWordSpec with Matchers {
7878
create(10500839 - 1) shouldBe ForkId(0x7ba22882L, Some(10500839))
7979
create(10500839) shouldBe ForkId(0x9007bfccL, Some(11700000))
8080
create(11700000 - 1) shouldBe ForkId(0x9007bfccL, Some(11700000))
81-
create(11700000) shouldBe ForkId(0xdb63a1caL, None)
81+
create(11700000) shouldBe ForkId(0xdb63a1caL, Some(13189133))
82+
create(13189133-1) shouldBe ForkId(0xdb63a1caL, Some(13189133))
83+
create(13189133) shouldBe ForkId(0x0f6bf187L, None) // First Magneto block
8284
}
8385

8486
"create correct ForkId for mordor blocks" in {
@@ -92,11 +94,9 @@ class ForkIdSpec extends AnyWordSpec with Matchers {
9294
create(999982) shouldBe ForkId(0x604f6ee1L, Some(999983))
9395
create(999983) shouldBe ForkId(0xf42f5539L, Some(2520000))
9496
create(2519999) shouldBe ForkId(0xf42f5539L, Some(2520000))
95-
create(2520000) shouldBe ForkId(0x66b5c286L, None)
96-
// TODO: Add Magneto
97-
// create(2520000) shouldBe ForkId(0x66b5c286L, Some(3985893))
98-
// create(3985893) shouldBe ForkId(0x66b5c286L, Some(3985893))
99-
// create(3985894) shouldBe ForkId(0x92b323e0L, None)
97+
create(2520000) shouldBe ForkId(0x66b5c286L, Some(3985893))
98+
create(3985893-1) shouldBe ForkId(0x66b5c286L, Some(3985893))
99+
create(3985893) shouldBe ForkId(0x92b323e0L, None) // First Magneto block
100100
}
101101

102102
// Here’s a couple of tests to verify the proper RLP encoding (since FORK_HASH is a 4 byte binary but FORK_NEXT is an 8 byte quantity):

0 commit comments

Comments
 (0)