Skip to content

Commit 9146a3b

Browse files
fixup! [ETCM-355] Fix formatting
1 parent 8d4a99e commit 9146a3b

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

src/test/scala/io/iohk/ethereum/network/p2p/MessageDecodersSpec.scala

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,15 @@ class MessageDecodersSpec extends AnyFlatSpec with Matchers with SecureRandomBui
8383
val getBlockHeaders = ETH62.GetBlockHeaders(Left(1), 1, 1, false)
8484
val getBlockHeadersBytes: Array[Byte] = getBlockHeaders.toBytes
8585

86-
decode(ProtocolVersions.ETH63).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(getBlockHeaders)
87-
decode(ProtocolVersions.ETH64).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(getBlockHeaders)
88-
decode(ProtocolVersions.ETC64).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(getBlockHeaders)
86+
decode(ProtocolVersions.ETH63).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(
87+
getBlockHeaders
88+
)
89+
decode(ProtocolVersions.ETH64).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(
90+
getBlockHeaders
91+
)
92+
decode(ProtocolVersions.ETC64).fromBytes(Codes.GetBlockHeadersCode, getBlockHeadersBytes) shouldBe Right(
93+
getBlockHeaders
94+
)
8995
}
9096

9197
it should "decode BlockHeaders message for all supported versions of protocol" in {
@@ -101,9 +107,15 @@ class MessageDecodersSpec extends AnyFlatSpec with Matchers with SecureRandomBui
101107
val getBlockBodies = ETH62.GetBlockBodies(Seq(exampleHash))
102108
val getBlockBodiesBytes: Array[Byte] = getBlockBodies.toBytes
103109

104-
decode(ProtocolVersions.ETH63).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(getBlockBodies)
105-
decode(ProtocolVersions.ETH64).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(getBlockBodies)
106-
decode(ProtocolVersions.ETC64).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(getBlockBodies)
110+
decode(ProtocolVersions.ETH63).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(
111+
getBlockBodies
112+
)
113+
decode(ProtocolVersions.ETH64).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(
114+
getBlockBodies
115+
)
116+
decode(ProtocolVersions.ETC64).fromBytes(Codes.GetBlockBodiesCode, getBlockBodiesBytes) shouldBe Right(
117+
getBlockBodies
118+
)
107119
}
108120

109121
it should "decode BlockBodies message for all supported versions of protocol" in {
@@ -187,7 +199,8 @@ class MessageDecodersSpec extends AnyFlatSpec with Matchers with SecureRandomBui
187199
}
188200

189201
it should "not decode message not existing in given protocol" in {
190-
decode(ProtocolVersions.ETH63).fromBytes(Codes.SignedTransactionsCode, blockHashesFromNumberBytes) shouldBe a[Left[_, Message]]
202+
decode(ProtocolVersions.ETH63)
203+
.fromBytes(Codes.SignedTransactionsCode, blockHashesFromNumberBytes) shouldBe a[Left[_, Message]]
191204

192205
}
193206

src/test/scala/io/iohk/ethereum/network/p2p/messages/NodeDataSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ class NodeDataSpec extends AnyFlatSpec with Matchers {
9090
it should "be decoded properly" in {
9191
val result = EthereumMessageDecoder
9292
.ethMessageDecoder(ProtocolVersions.ETH63)
93-
.fromBytes(Codes.NodeDataCode, encode(encodedNodeData)).getOrElse(fail("Should have decoded NodeData"))
93+
.fromBytes(Codes.NodeDataCode, encode(encodedNodeData))
94+
.getOrElse(fail("Should have decoded NodeData"))
9495

9596
result match {
9697
case m: NodeData =>

0 commit comments

Comments
 (0)