diff --git a/server/app/com/xsn/explorer/data/BlockDataHandler.scala b/server/app/com/xsn/explorer/data/BlockDataHandler.scala index d1f4218..679c8a9 100644 --- a/server/app/com/xsn/explorer/data/BlockDataHandler.scala +++ b/server/app/com/xsn/explorer/data/BlockDataHandler.scala @@ -5,8 +5,7 @@ import com.alexitc.playsonify.models.ordering.FieldOrdering import com.alexitc.playsonify.models.pagination.{PaginatedQuery, PaginatedResult} import com.xsn.explorer.models.fields.BlockField import com.xsn.explorer.models.persisted.Block -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import scala.language.higherKinds diff --git a/server/app/com/xsn/explorer/data/anorm/BlockPostgresDataHandler.scala b/server/app/com/xsn/explorer/data/anorm/BlockPostgresDataHandler.scala index 52385af..7b88137 100644 --- a/server/app/com/xsn/explorer/data/anorm/BlockPostgresDataHandler.scala +++ b/server/app/com/xsn/explorer/data/anorm/BlockPostgresDataHandler.scala @@ -8,8 +8,7 @@ import com.xsn.explorer.data.anorm.dao.BlockPostgresDAO import com.xsn.explorer.errors._ import com.xsn.explorer.models.fields.BlockField import com.xsn.explorer.models.persisted.Block -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import javax.inject.Inject import org.scalactic.{Good, One, Or} import play.api.db.Database diff --git a/server/app/com/xsn/explorer/data/anorm/dao/BlockPostgresDAO.scala b/server/app/com/xsn/explorer/data/anorm/dao/BlockPostgresDAO.scala index 1389de4..f442345 100644 --- a/server/app/com/xsn/explorer/data/anorm/dao/BlockPostgresDAO.scala +++ b/server/app/com/xsn/explorer/data/anorm/dao/BlockPostgresDAO.scala @@ -9,8 +9,7 @@ import com.alexitc.playsonify.sql.FieldOrderingSQLInterpreter import com.xsn.explorer.data.anorm.parsers.BlockParsers._ import com.xsn.explorer.models.fields.BlockField import com.xsn.explorer.models.persisted.Block -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import javax.inject.Inject class BlockPostgresDAO @Inject() (fieldOrderingSQLInterpreter: FieldOrderingSQLInterpreter) { diff --git a/server/app/com/xsn/explorer/data/async/BlockFutureDataHandler.scala b/server/app/com/xsn/explorer/data/async/BlockFutureDataHandler.scala index 5e28d40..cff8a19 100644 --- a/server/app/com/xsn/explorer/data/async/BlockFutureDataHandler.scala +++ b/server/app/com/xsn/explorer/data/async/BlockFutureDataHandler.scala @@ -7,8 +7,7 @@ import com.xsn.explorer.data.{BlockBlockingDataHandler, BlockDataHandler} import com.xsn.explorer.executors.DatabaseExecutionContext import com.xsn.explorer.models.fields.BlockField import com.xsn.explorer.models.persisted.Block -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import javax.inject.Inject import scala.concurrent.Future diff --git a/server/app/com/xsn/explorer/models/persisted/Block.scala b/server/app/com/xsn/explorer/models/persisted/Block.scala index 168f924..331a229 100644 --- a/server/app/com/xsn/explorer/models/persisted/Block.scala +++ b/server/app/com/xsn/explorer/models/persisted/Block.scala @@ -1,7 +1,7 @@ package com.xsn.explorer.models.persisted import com.xsn.explorer.models._ -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import enumeratum._ case class Block( diff --git a/server/app/com/xsn/explorer/models/rpc/Block.scala b/server/app/com/xsn/explorer/models/rpc/Block.scala index a624f05..7de0770 100644 --- a/server/app/com/xsn/explorer/models/rpc/Block.scala +++ b/server/app/com/xsn/explorer/models/rpc/Block.scala @@ -1,7 +1,7 @@ package com.xsn.explorer.models.rpc import com.xsn.explorer.models._ -import com.xsn.explorer.models.values.{Blockhash, Confirmations} +import com.xsn.explorer.models.values.{Blockhash, Confirmations, Height} import play.api.libs.functional.syntax._ import play.api.libs.json._ diff --git a/server/app/com/xsn/explorer/models/rpc/ServerStatistics.scala b/server/app/com/xsn/explorer/models/rpc/ServerStatistics.scala index e74fae4..8b09d45 100644 --- a/server/app/com/xsn/explorer/models/rpc/ServerStatistics.scala +++ b/server/app/com/xsn/explorer/models/rpc/ServerStatistics.scala @@ -1,6 +1,6 @@ package com.xsn.explorer.models.rpc -import com.xsn.explorer.models.Height +import com.xsn.explorer.models.values.Height import play.api.libs.functional.syntax._ import play.api.libs.json.{Json, Reads, Writes, __} diff --git a/server/app/com/xsn/explorer/models/Height.scala b/server/app/com/xsn/explorer/models/values/Height.scala similarity index 86% rename from server/app/com/xsn/explorer/models/Height.scala rename to server/app/com/xsn/explorer/models/values/Height.scala index 602ac8b..6e7a08b 100644 --- a/server/app/com/xsn/explorer/models/Height.scala +++ b/server/app/com/xsn/explorer/models/values/Height.scala @@ -1,4 +1,4 @@ -package com.xsn.explorer.models +package com.xsn.explorer.models.values import com.alexitc.playsonify.models.WrappedInt import play.api.libs.json.{JsPath, Reads} diff --git a/server/app/com/xsn/explorer/services/BlockService.scala b/server/app/com/xsn/explorer/services/BlockService.scala index 33b8a7d..f493db4 100644 --- a/server/app/com/xsn/explorer/services/BlockService.scala +++ b/server/app/com/xsn/explorer/services/BlockService.scala @@ -5,7 +5,7 @@ import com.alexitc.playsonify.core.FutureOr.Implicits.{FutureOps, OrOps} import com.xsn.explorer.errors.BlockRewardsNotFoundError import com.xsn.explorer.models._ import com.xsn.explorer.models.rpc.{Block, TransactionVIN} -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import com.xsn.explorer.services.logic.{BlockLogic, TransactionLogic} import com.xsn.explorer.util.Extensions.FutureOrExt import javax.inject.Inject diff --git a/server/app/com/xsn/explorer/services/LedgerSynchronizerService.scala b/server/app/com/xsn/explorer/services/LedgerSynchronizerService.scala index 8f0446d..cb59ade 100644 --- a/server/app/com/xsn/explorer/services/LedgerSynchronizerService.scala +++ b/server/app/com/xsn/explorer/services/LedgerSynchronizerService.scala @@ -6,8 +6,7 @@ import com.xsn.explorer.data.async.{BlockFutureDataHandler, LedgerFutureDataHand import com.xsn.explorer.errors.BlockNotFoundError import com.xsn.explorer.models.persisted.{Block, Transaction} import com.xsn.explorer.models.transformers._ -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import com.xsn.explorer.util.Extensions.FutureOrExt import javax.inject.Inject import org.scalactic.Good diff --git a/server/app/com/xsn/explorer/services/XSNService.scala b/server/app/com/xsn/explorer/services/XSNService.scala index 2d46886..2b1d29b 100644 --- a/server/app/com/xsn/explorer/services/XSNService.scala +++ b/server/app/com/xsn/explorer/services/XSNService.scala @@ -7,7 +7,7 @@ import com.xsn.explorer.config.{ExplorerConfig, RPCConfig} import com.xsn.explorer.errors._ import com.xsn.explorer.executors.ExternalServiceExecutionContext import com.xsn.explorer.models._ -import com.xsn.explorer.models.values.{Address, Blockhash} +import com.xsn.explorer.models.values.{Address, Blockhash, Height} import javax.inject.Inject import org.scalactic.{Bad, Good} import org.slf4j.LoggerFactory diff --git a/server/app/controllers/BlocksController.scala b/server/app/controllers/BlocksController.scala index 87653f3..9d6d310 100644 --- a/server/app/controllers/BlocksController.scala +++ b/server/app/controllers/BlocksController.scala @@ -2,7 +2,7 @@ package controllers import com.alexitc.playsonify.models.ordering.OrderingQuery import com.alexitc.playsonify.models.pagination.{Limit, Offset, PaginatedQuery} -import com.xsn.explorer.models.Height +import com.xsn.explorer.models.values.Height import com.xsn.explorer.services.{BlockService, TransactionService} import controllers.common.{Codecs, MyJsonController, MyJsonControllerComponents} import javax.inject.Inject diff --git a/server/test/com/xsn/explorer/data/TransactionPostgresDataHandlerSpec.scala b/server/test/com/xsn/explorer/data/TransactionPostgresDataHandlerSpec.scala index e3d1947..786ee6c 100644 --- a/server/test/com/xsn/explorer/data/TransactionPostgresDataHandlerSpec.scala +++ b/server/test/com/xsn/explorer/data/TransactionPostgresDataHandlerSpec.scala @@ -12,6 +12,7 @@ import com.xsn.explorer.models._ import com.xsn.explorer.models.fields.TransactionField import com.xsn.explorer.models.persisted.Transaction import com.xsn.explorer.models.rpc.Block +import com.xsn.explorer.models.values.Height import org.scalactic.{Good, One, Or} import org.scalatest.BeforeAndAfter diff --git a/server/test/com/xsn/explorer/helpers/DataGenerator.scala b/server/test/com/xsn/explorer/helpers/DataGenerator.scala index 2724233..a6bd48b 100644 --- a/server/test/com/xsn/explorer/helpers/DataGenerator.scala +++ b/server/test/com/xsn/explorer/helpers/DataGenerator.scala @@ -2,8 +2,8 @@ package com.xsn.explorer.helpers import com.xsn.explorer.models.persisted.Transaction import com.xsn.explorer.models.rpc.Block -import com.xsn.explorer.models.values.{Address, Blockhash, Confirmations} -import com.xsn.explorer.models.{Height, HexString, Size, TransactionId} +import com.xsn.explorer.models.values.{Address, Blockhash, Confirmations, Height} +import com.xsn.explorer.models.{HexString, Size, TransactionId} trait DataGenerator { diff --git a/server/test/com/xsn/explorer/helpers/DummyXSNService.scala b/server/test/com/xsn/explorer/helpers/DummyXSNService.scala index 238fa4d..f290785 100644 --- a/server/test/com/xsn/explorer/helpers/DummyXSNService.scala +++ b/server/test/com/xsn/explorer/helpers/DummyXSNService.scala @@ -3,7 +3,7 @@ package com.xsn.explorer.helpers import com.alexitc.playsonify.core.FutureApplicationResult import com.xsn.explorer.models._ import com.xsn.explorer.models.rpc.Masternode -import com.xsn.explorer.models.values.{Address, Blockhash} +import com.xsn.explorer.models.values.{Address, Blockhash, Height} import com.xsn.explorer.services.XSNService import play.api.libs.json.JsValue diff --git a/server/test/com/xsn/explorer/helpers/FileBasedXSNService.scala b/server/test/com/xsn/explorer/helpers/FileBasedXSNService.scala index 6479d84..f9e0ad3 100644 --- a/server/test/com/xsn/explorer/helpers/FileBasedXSNService.scala +++ b/server/test/com/xsn/explorer/helpers/FileBasedXSNService.scala @@ -3,8 +3,8 @@ package com.xsn.explorer.helpers import com.alexitc.playsonify.core.FutureApplicationResult import com.xsn.explorer.errors.{BlockNotFoundError, TransactionNotFoundError} import com.xsn.explorer.models.rpc.{Block, Transaction} -import com.xsn.explorer.models.values.Blockhash -import com.xsn.explorer.models.{Height, TransactionId} +import com.xsn.explorer.models.values.{Blockhash, Height} +import com.xsn.explorer.models.TransactionId import org.scalactic.{Good, One, Or} import play.api.libs.json.JsValue diff --git a/server/test/com/xsn/explorer/services/LedgerSynchronizerServiceSpec.scala b/server/test/com/xsn/explorer/services/LedgerSynchronizerServiceSpec.scala index 9782a0c..e481b72 100644 --- a/server/test/com/xsn/explorer/services/LedgerSynchronizerServiceSpec.scala +++ b/server/test/com/xsn/explorer/services/LedgerSynchronizerServiceSpec.scala @@ -9,8 +9,7 @@ import com.xsn.explorer.helpers.DataHandlerObjects._ import com.xsn.explorer.helpers.LedgerHelper._ import com.xsn.explorer.helpers._ import com.xsn.explorer.models.rpc.Block -import com.xsn.explorer.models.Height -import com.xsn.explorer.models.values.Blockhash +import com.xsn.explorer.models.values.{Blockhash, Height} import com.xsn.explorer.parsers.TransactionOrderingParser import org.scalactic.{Bad, Good, One, Or} import org.scalatest.BeforeAndAfter diff --git a/server/test/controllers/BlocksControllerSpec.scala b/server/test/controllers/BlocksControllerSpec.scala index 1589e63..427e9b5 100644 --- a/server/test/controllers/BlocksControllerSpec.scala +++ b/server/test/controllers/BlocksControllerSpec.scala @@ -9,7 +9,7 @@ import com.xsn.explorer.helpers._ import com.xsn.explorer.models._ import com.xsn.explorer.models.fields.TransactionField import com.xsn.explorer.models.rpc.Block -import com.xsn.explorer.models.values.{Blockhash, Confirmations} +import com.xsn.explorer.models.values.{Blockhash, Confirmations, Height} import com.xsn.explorer.services.XSNService import controllers.common.MyAPISpec import org.scalactic.Good