diff --git a/build.sbt b/build.sbt index 0c71506fdd..cc19d47f62 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ import sbt.internal.inc.ReflectUtilities addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full) -def nodeVersionTag: String = "v1.0.1" +def nodeVersionTag: String = "v1.0.2" lazy val node = ProjectRef(uri(s"git://github.com/wavesplatform/Waves.git#$nodeVersionTag"), "node") diff --git a/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrderTypeTestSuite.scala b/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrderTypeTestSuite.scala index d58de900df..7980252618 100644 --- a/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrderTypeTestSuite.scala +++ b/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrderTypeTestSuite.scala @@ -1,6 +1,6 @@ package com.wavesplatform.it.sync.smartcontracts -import com.wavesplatform.api.http.TransactionNotAllowedByAccountScript +import com.wavesplatform.api.http.ApiError.TransactionNotAllowedByAccountScript import com.wavesplatform.common.state.ByteStr import com.wavesplatform.it.MatcherSuiteBase import com.wavesplatform.it.api.SyncHttpApi._ diff --git a/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrdersFromScriptedAssetTestSuite.scala b/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrdersFromScriptedAssetTestSuite.scala index 07cfcc015d..d3ef902490 100644 --- a/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrdersFromScriptedAssetTestSuite.scala +++ b/dex-it/src/test/scala/com/wavesplatform/it/sync/smartcontracts/OrdersFromScriptedAssetTestSuite.scala @@ -2,7 +2,7 @@ package com.wavesplatform.it.sync.smartcontracts import com.typesafe.config.{Config, ConfigFactory} import com.wavesplatform.account.AddressScheme -import com.wavesplatform.api.http.TransactionNotAllowedByAssetScript +import com.wavesplatform.api.http.ApiError.TransactionNotAllowedByAssetScript import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.features.BlockchainFeatures import com.wavesplatform.it.MatcherSuiteBase @@ -207,7 +207,7 @@ object OrdersFromScriptedAssetTestSuite { } private val AllowAsset = mkAllowAsset(0) - private val AllowAssetId = AllowAsset.id().toString + private val AllowAssetId = AllowAsset.id().toString private val AllowAsset2 = mkAllowAsset(1) private val AllowAsset2Id = AllowAsset2.id().toString private val AllowAsset3 = mkAllowAsset(1) diff --git a/dex/src/main/scala/com/wavesplatform/dex/api/MatcherApiRoute.scala b/dex/src/main/scala/com/wavesplatform/dex/api/MatcherApiRoute.scala index ec0919a0a4..1652647ffc 100644 --- a/dex/src/main/scala/com/wavesplatform/dex/api/MatcherApiRoute.scala +++ b/dex/src/main/scala/com/wavesplatform/dex/api/MatcherApiRoute.scala @@ -128,7 +128,7 @@ case class MatcherApiRoute(assetPairBuilder: AssetPairBuilder, private def withCancelRequest(f: CancelOrderRequest => Route): Route = post { entity(as[CancelOrderRequest]) { req => - if (req.isSignatureValid()) f(req) else complete(CancelRequestInvalidSignature) + if (req.isSignatureValid()) f(req) else complete(InvalidSignature) } ~ complete(StatusCodes.BadRequest) } ~ complete(StatusCodes.MethodNotAllowed) diff --git a/dex/src/main/scala/com/wavesplatform/dex/api/MatcherResponse.scala b/dex/src/main/scala/com/wavesplatform/dex/api/MatcherResponse.scala index 3588343366..d5491c4f57 100644 --- a/dex/src/main/scala/com/wavesplatform/dex/api/MatcherResponse.scala +++ b/dex/src/main/scala/com/wavesplatform/dex/api/MatcherResponse.scala @@ -71,7 +71,7 @@ case class BatchCancelCompleted(orders: Map[Order.Id, MatcherResponse]) case class OrderRejected(error: MatcherError) extends MatcherResponse(C.BadRequest, error) case class OrderCancelRejected(error: MatcherError) extends MatcherResponse(C.BadRequest, error) -case object CancelRequestInvalidSignature extends MatcherResponse(C.BadRequest, error.RequestInvalidSignature) +case object InvalidSignature extends MatcherResponse(C.BadRequest, error.RequestInvalidSignature) case class NotImplemented(error: MatcherError) extends MatcherResponse(C.NotImplemented, error) case class OrderBookUnavailable(error: MatcherError) extends MatcherResponse(C.ServiceUnavailable, error) case object DuringStart extends MatcherResponse(C.ServiceUnavailable, error.MatcherIsStarting) diff --git a/dex/src/main/scala/com/wavesplatform/dex/smart/MatcherContext.scala b/dex/src/main/scala/com/wavesplatform/dex/smart/MatcherContext.scala index f6ce763a2d..76331f31fd 100644 --- a/dex/src/main/scala/com/wavesplatform/dex/smart/MatcherContext.scala +++ b/dex/src/main/scala/com/wavesplatform/dex/smart/MatcherContext.scala @@ -30,6 +30,7 @@ import com.wavesplatform.transaction.assets.IssueTransaction import com.wavesplatform.transaction.assets.exchange.Order import com.wavesplatform.transaction.lease.LeaseTransaction import com.wavesplatform.transaction.smart.BlockchainContext +import com.wavesplatform.transaction.transfer.TransferTransaction import com.wavesplatform.transaction.{Asset, Transaction, TransactionParser} import com.wavesplatform.utils.CloseableIterator import monix.eval.Coeval @@ -120,6 +121,8 @@ object MatcherContext { * @note Portfolios passed to `pf` only contain Waves and Leasing balances to improve performance */ override def collectLposPortfolios[A](pf: PartialFunction[(Address, Portfolio), A]): Map[Address, A] = kill("collectLposPortfolios") override def invokeScriptResult(txId: TransactionId): Either[ValidationError, InvokeScriptResult] = kill("invokeScriptResult") + + override def transferById(id: BlockId): Option[(Int, TransferTransaction)] = kill("transferById") } } diff --git a/dex/src/test/scala/com/wavesplatform/dex/api/MatcherApiRouteSpec.scala b/dex/src/test/scala/com/wavesplatform/dex/api/MatcherApiRouteSpec.scala index dfd4a32de3..a6def40ac2 100644 --- a/dex/src/test/scala/com/wavesplatform/dex/api/MatcherApiRouteSpec.scala +++ b/dex/src/test/scala/com/wavesplatform/dex/api/MatcherApiRouteSpec.scala @@ -50,7 +50,7 @@ class MatcherApiRouteSpec extends RouteSpec("/matcher") with RequestGen with Pat mkGet(route)(Base58.encode(publicKey), ts, ";;") ~> check { status shouldBe StatusCodes.BadRequest val message = (responseAs[JsValue] \ "message").as[JsString] - message.value shouldEqual "invalid signature" + message.value shouldEqual "The request has an invalid signature" } } diff --git a/project/ExtensionPackaging.scala b/project/ExtensionPackaging.scala index 4fc75ebddd..568b1a30b8 100644 --- a/project/ExtensionPackaging.scala +++ b/project/ExtensionPackaging.scala @@ -51,10 +51,7 @@ object ExtensionPackaging extends AutoPlugin { }, classpath := makeRelativeClasspathNames(classpathOrdering.value), nodePackageName := s"waves${network.value.packageSuffix}", - debianPackageDependencies := Seq( - s"${nodePackageName.value} (>= ${nodeVersion.value})", - s"${nodePackageName.value} (<= ${mostSupportedVersion(nodeVersion.value)})" - ), + debianPackageDependencies := Seq(s"${nodePackageName.value} (= ${nodeVersion.value})"), // To write files to Waves NODE directory linuxPackageMappings := getUniversalFolderMappings( nodePackageName.value,