From 0144e51e2f54e4c376d8628ea18909ee59314ccc Mon Sep 17 00:00:00 2001 From: Wolfgang Welz <welzwo@gmail.com> Date: Thu, 25 Jun 2020 18:57:10 +0200 Subject: [PATCH] Test: Set PoW difficulty in integrations tests to 2 (#552) * set pow difficulty in integrations tests to 4 * change test-network pow difficulty to 2 --- go.sum | 2 -- plugins/pow/plugin.go | 2 ++ tools/docker-network/config.docker.json | 2 +- tools/integration-tests/tester/framework/parameters.go | 2 +- tools/integration-tests/tester/go.sum | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/go.sum b/go.sum index de441943..4ad17fa5 100644 --- a/go.sum +++ b/go.sum @@ -229,8 +229,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iotaledger/hive.go v0.0.0-20200622211038-2db5f8e0532d h1:cyxepG077Tg1wNfbhkRhXMK9WwaN4N0dDW7T8+d3oHA= -github.com/iotaledger/hive.go v0.0.0-20200622211038-2db5f8e0532d/go.mod h1:42UvBc41QBsuM7z1P1fABMonTJb7kGqkzshRebClQvA= github.com/iotaledger/hive.go v0.0.0-20200625105326-310ea88f1337 h1:F6PzAkymPcKr1vJVK3/80wiVovjkL47c9FMjUOesXGA= github.com/iotaledger/hive.go v0.0.0-20200625105326-310ea88f1337/go.mod h1:42UvBc41QBsuM7z1P1fABMonTJb7kGqkzshRebClQvA= github.com/iotaledger/iota.go v1.0.0-beta.15 h1:HI8PqerEnO1CCIqmXHJ6zh1IaSFXU+S0qlUAEKshho8= diff --git a/plugins/pow/plugin.go b/plugins/pow/plugin.go index 90b76e0c..d8056d6d 100644 --- a/plugins/pow/plugin.go +++ b/plugins/pow/plugin.go @@ -28,6 +28,8 @@ func run(*node.Plugin) { // assure that the PoW worker is initialized worker := Worker() + log.Infof("%s started: difficult=%d", PluginName, difficulty) + messagelayer.MessageParser().AddBytesFilter(builtinfilters.NewPowFilter(worker, difficulty)) messagelayer.MessageFactory().SetWorker(messagefactory.WorkerFunc(DoPOW)) } diff --git a/tools/docker-network/config.docker.json b/tools/docker-network/config.docker.json index 34e33468..e1fabdcb 100644 --- a/tools/docker-network/config.docker.json +++ b/tools/docker-network/config.docker.json @@ -60,7 +60,7 @@ "enablePlugins": [] }, "pow": { - "difficulty": 4, + "difficulty": 2, "numThreads": 1, "timeout": "10s" }, diff --git a/tools/integration-tests/tester/framework/parameters.go b/tools/integration-tests/tester/framework/parameters.go index 2c71c7f8..6d33d363 100644 --- a/tools/integration-tests/tester/framework/parameters.go +++ b/tools/integration-tests/tester/framework/parameters.go @@ -34,7 +34,7 @@ var ( // ParaFaucetTokensPerRequest defines the tokens to send up on each faucet request message. ParaFaucetTokensPerRequest int64 = 1337 // ParaPoWDifficulty defines the PoW difficulty. - ParaPoWDifficulty = 1 + ParaPoWDifficulty = 2 ) var ( diff --git a/tools/integration-tests/tester/go.sum b/tools/integration-tests/tester/go.sum index 820b66d5..6dbd85bc 100644 --- a/tools/integration-tests/tester/go.sum +++ b/tools/integration-tests/tester/go.sum @@ -260,8 +260,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iotaledger/hive.go v0.0.0-20200622211038-2db5f8e0532d h1:cyxepG077Tg1wNfbhkRhXMK9WwaN4N0dDW7T8+d3oHA= -github.com/iotaledger/hive.go v0.0.0-20200622211038-2db5f8e0532d/go.mod h1:42UvBc41QBsuM7z1P1fABMonTJb7kGqkzshRebClQvA= github.com/iotaledger/hive.go v0.0.0-20200625105326-310ea88f1337 h1:F6PzAkymPcKr1vJVK3/80wiVovjkL47c9FMjUOesXGA= github.com/iotaledger/hive.go v0.0.0-20200625105326-310ea88f1337/go.mod h1:42UvBc41QBsuM7z1P1fABMonTJb7kGqkzshRebClQvA= github.com/iotaledger/iota.go v1.0.0-beta.15/go.mod h1:Rn6v5hLAn8YBaJlRu1ZQdPAgKlshJR1PTeLQaft2778= -- GitLab