You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2020/06/08 06:34:42 UTC

[incubator-tuweni] branch master updated: Add missing kv stores

This is an automated email from the ASF dual-hosted git repository.

toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git


The following commit(s) were added to refs/heads/master by this push:
     new 7475e21  Add missing kv stores
7475e21 is described below

commit 7475e216154a9cf6637e503c92ff285a72d175a7
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Sun Jun 7 23:28:54 2020 -0700

    Add missing kv stores
---
 .../tuweni/devp2p/eth/ConnectToAnotherNodeTest.kt      |  3 +++
 .../org/apache/tuweni/devp2p/eth/EthHandlerTest.kt     |  2 ++
 .../org/apache/tuweni/devp2p/eth/EthSubprotocolTest.kt |  6 ++++++
 .../tuweni/eth/repository/BlockchainRepositoryTest.kt  | 10 ++++++++++
 .../org/apache/tuweni/les/LESSubProtocolHandlerTest.kt | 14 ++++++++++++++
 .../kotlin/org/apache/tuweni/les/LESSubprotocolTest.kt | 18 ++++++++++++------
 6 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/devp2p-eth/src/integrationTest/kotlin/org/apache/tuweni/devp2p/eth/ConnectToAnotherNodeTest.kt b/devp2p-eth/src/integrationTest/kotlin/org/apache/tuweni/devp2p/eth/ConnectToAnotherNodeTest.kt
index 11ea363..147c779 100644
--- a/devp2p-eth/src/integrationTest/kotlin/org/apache/tuweni/devp2p/eth/ConnectToAnotherNodeTest.kt
+++ b/devp2p-eth/src/integrationTest/kotlin/org/apache/tuweni/devp2p/eth/ConnectToAnotherNodeTest.kt
@@ -59,6 +59,7 @@ class ConnectToAnotherNodeTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer),
       genesisBlock
     )
@@ -113,6 +114,7 @@ class ConnectToAnotherNodeTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer),
       genesisBlock
     )
@@ -143,6 +145,7 @@ class ConnectToAnotherNodeTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer),
       genesisBlock
     )
diff --git a/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthHandlerTest.kt b/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthHandlerTest.kt
index 714ea99..8e6910d 100644
--- a/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthHandlerTest.kt
+++ b/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthHandlerTest.kt
@@ -105,6 +105,8 @@ class EthHandlerTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
         BlockchainIndex(writer),
         genesisBlock
       )
diff --git a/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthSubprotocolTest.kt b/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthSubprotocolTest.kt
index 2085835..4ba3c35 100644
--- a/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthSubprotocolTest.kt
+++ b/devp2p-eth/src/test/kotlin/org/apache/tuweni/devp2p/eth/EthSubprotocolTest.kt
@@ -52,6 +52,8 @@ class EthSubprotocolTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer)
     )
     val eth = EthSubprotocol(
@@ -68,6 +70,8 @@ class EthSubprotocolTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer)
     )
     val eth = EthSubprotocol(
@@ -88,6 +92,8 @@ class EthSubprotocolTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer)
     )
     val eth = EthSubprotocol(
diff --git a/eth-repository/src/test/kotlin/org/apache/tuweni/eth/repository/BlockchainRepositoryTest.kt b/eth-repository/src/test/kotlin/org/apache/tuweni/eth/repository/BlockchainRepositoryTest.kt
index 86355f6..ce51e4b 100644
--- a/eth-repository/src/test/kotlin/org/apache/tuweni/eth/repository/BlockchainRepositoryTest.kt
+++ b/eth-repository/src/test/kotlin/org/apache/tuweni/eth/repository/BlockchainRepositoryTest.kt
@@ -74,6 +74,8 @@ internal class BlockchainRepositoryTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
         BlockchainIndex(writer),
         genesisBlock
       )
@@ -142,6 +144,8 @@ internal class BlockchainRepositoryTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
         BlockchainIndex(writer),
         genesisBlock
       )
@@ -249,6 +253,8 @@ internal class BlockchainRepositoryTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
         BlockchainIndex(writer),
         genesisBlock
       )
@@ -355,6 +361,8 @@ internal class BlockchainRepositoryTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer),
       genesisBlock
     )
@@ -461,6 +469,8 @@ internal class BlockchainRepositoryTest {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer),
       genesisBlock
     )
diff --git a/les/src/test/kotlin/org/apache/tuweni/les/LESSubProtocolHandlerTest.kt b/les/src/test/kotlin/org/apache/tuweni/les/LESSubProtocolHandlerTest.kt
index 6903208..0994810 100644
--- a/les/src/test/kotlin/org/apache/tuweni/les/LESSubProtocolHandlerTest.kt
+++ b/les/src/test/kotlin/org/apache/tuweni/les/LESSubProtocolHandlerTest.kt
@@ -148,6 +148,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
@@ -199,6 +201,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
@@ -233,6 +237,8 @@ constructor() {
       MapKeyValueStore(),
       MapKeyValueStore(),
       MapKeyValueStore(),
+      MapKeyValueStore(),
+      MapKeyValueStore(),
       BlockchainIndex(writer)
     )
     val handler = LESSubProtocolHandler(
@@ -265,6 +271,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
@@ -328,6 +336,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
@@ -395,6 +405,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
@@ -446,6 +458,8 @@ constructor() {
           MapKeyValueStore(),
           MapKeyValueStore(),
           MapKeyValueStore(),
+          MapKeyValueStore(),
+          MapKeyValueStore(),
           BlockchainIndex(writer),
           block
         )
diff --git a/les/src/test/kotlin/org/apache/tuweni/les/LESSubprotocolTest.kt b/les/src/test/kotlin/org/apache/tuweni/les/LESSubprotocolTest.kt
index a3438b9..cb8aaea 100644
--- a/les/src/test/kotlin/org/apache/tuweni/les/LESSubprotocolTest.kt
+++ b/les/src/test/kotlin/org/apache/tuweni/les/LESSubprotocolTest.kt
@@ -16,6 +16,7 @@
  */
 package org.apache.tuweni.les
 
+import org.apache.lucene.index.IndexWriter
 import org.apache.tuweni.eth.repository.BlockchainIndex
 import org.apache.tuweni.eth.repository.BlockchainRepository
 import org.apache.tuweni.junit.LuceneIndexWriter
@@ -24,7 +25,6 @@ import org.apache.tuweni.junit.TempDirectoryExtension
 import org.apache.tuweni.kv.MapKeyValueStore
 import org.apache.tuweni.rlpx.wire.SubProtocolIdentifier
 import org.apache.tuweni.units.bigints.UInt256
-import org.apache.lucene.index.IndexWriter
 import org.junit.jupiter.api.Assertions.assertFalse
 import org.junit.jupiter.api.Assertions.assertTrue
 import org.junit.jupiter.api.Test
@@ -48,11 +48,13 @@ internal class LESSubprotocolTest {
       UInt256.ZERO,
       UInt256.ZERO,
       BlockchainRepository(
-      MapKeyValueStore(),
-      MapKeyValueStore(),
-      MapKeyValueStore(),
         MapKeyValueStore(),
-      BlockchainIndex(writer)
+        MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
+        BlockchainIndex(writer)
       )
     )
     assertTrue(sp.supports(SubProtocolIdentifier.of("les", 2)))
@@ -75,7 +77,9 @@ internal class LESSubprotocolTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
-      BlockchainIndex(writer)
+        MapKeyValueStore(),
+        MapKeyValueStore(),
+        BlockchainIndex(writer)
       )
     )
     assertFalse(sp.supports(SubProtocolIdentifier.of("les", 3)))
@@ -97,6 +101,8 @@ internal class LESSubprotocolTest {
         MapKeyValueStore(),
         MapKeyValueStore(),
         MapKeyValueStore(),
+        MapKeyValueStore(),
+        MapKeyValueStore(),
         BlockchainIndex(writer)
       )
     )


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org