Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE-2633 Allowed mining by light node #3918

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.wavesplatform.it.sync.lightnode

import com.typesafe.config.Config
import com.wavesplatform.it.api.SyncHttpApi.*
import com.wavesplatform.it.{BaseFunSuite, NodeConfigs, TransferSending}

class LightNodeMiningSuite extends BaseFunSuite with TransferSending {
override def nodeConfigs: Seq[Config] =
NodeConfigs.newBuilder
.overrideBase(_.lightNode)
.withDefault(2)
.buildNonConflicting()

test("nodes can mine in light mode") {
val first = nodes.head
val second = nodes.last

val tx1 = first.transfer(first.keyPair, second.address, 1, waitForTx = true)
nodes.waitForHeightArise()
second.transactionStatus(tx1.id).applicationStatus.get shouldBe "succeeded"

val tx2 = second.transfer(second.keyPair, first.address, 1, waitForTx = true)
nodes.waitForHeightArise()
first.transactionStatus(tx2.id).applicationStatus.get shouldBe "succeeded"
}
}
2 changes: 1 addition & 1 deletion node/src/main/scala/com/wavesplatform/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Application(val actorSystem: ActorSystem, val settings: WavesSettings, con

val pos = PoSSelector(blockchainUpdater, settings.synchronizationSettings.maxBaseTarget)

if (settings.minerSettings.enable && !settings.enableLightMode)
if (settings.minerSettings.enable)
miner = new MinerImpl(
allChannels,
blockchainUpdater,
Expand Down