From 7bcab2ffaf1b26625ab8457023cd4d177e60c49d Mon Sep 17 00:00:00 2001 From: fluency03 Date: Fri, 4 May 2018 18:11:30 +0200 Subject: [PATCH] package move com.fluency03 -> com.github.fluency03 --- README.md | 2 +- build.sbt | 4 ++-- project/plugins.sbt | 2 ++ .../fluency03/blockchain/Crypto.scala | 2 +- .../fluency03/blockchain/api/JsonSupport.scala | 2 +- .../fluency03/blockchain/api/Message.scala | 2 +- .../fluency03/blockchain/api/Server.scala | 6 +++--- .../blockchain/api/actors/ActorSupport.scala | 2 +- .../blockchain/api/actors/BlockPoolActor.scala | 8 ++++---- .../blockchain/api/actors/BlockchainActor.scala | 8 ++++---- .../blockchain/api/actors/NetworkActor.scala | 10 +++++----- .../blockchain/api/actors/PeerActor.scala | 6 +++--- .../blockchain/api/actors/TxPoolActor.scala | 10 +++++----- .../fluency03/blockchain/api/package.scala | 4 ++-- .../blockchain/api/routes/BlockPoolRoutes.scala | 8 ++++---- .../blockchain/api/routes/BlockchainRoutes.scala | 8 ++++---- .../blockchain/api/routes/GenericRoutes.scala | 4 ++-- .../blockchain/api/routes/NetworkRoutes.scala | 8 ++++---- .../blockchain/api/routes/RoutesSupport.scala | 4 ++-- .../blockchain/api/routes/TxPoolRoutes.scala | 8 ++++---- .../blockchain/api/routes/package.scala | 2 +- .../fluency03/blockchain/core/Block.scala | 8 ++++---- .../fluency03/blockchain/core/BlockHeader.scala | 4 ++-- .../fluency03/blockchain/core/Blockchain.scala | 6 +++--- .../fluency03/blockchain/core/Difficulty.scala | 2 +- .../fluency03/blockchain/core/Merkle.scala | 2 +- .../fluency03/blockchain/core/Peer.scala | 2 +- .../fluency03/blockchain/core/SingleWallet.scala | 6 +++--- .../fluency03/blockchain/core/Transaction.scala | 6 +++--- .../fluency03/blockchain/package.scala | 6 +++--- .../fluency03/blockchain/api/ServerTest.scala | 5 ----- .../fluency03/blockchain/CryptoTest.scala | 4 ++-- .../fluency03/blockchain/UtilTest.scala | 2 +- .../fluency03/blockchain/api/MessageTest.scala | 2 +- .../fluency03/blockchain/api/ServerTest.scala | 5 +++++ .../api/actors/BlockPoolActorTest.scala | 8 ++++---- .../api/actors/BlockchainActorTest.scala | 16 ++++++++-------- .../blockchain/api/actors/NetworkActorTest.scala | 8 ++++---- .../blockchain/api/actors/PeerActorTest.scala | 4 ++-- .../blockchain/api/actors/TxPoolActorTest.scala | 12 ++++++------ .../api/routes/BlockPoolRoutesTest.scala | 4 ++-- .../api/routes/BlockchainRoutesTest.scala | 4 ++-- .../api/routes/GenericRoutesTest.scala | 6 +++--- .../api/routes/NetworkRoutesTest.scala | 4 ++-- .../blockchain/api/routes/PackageTest.scala | 4 ++-- .../blockchain/api/routes/TxPoolRoutesTest.scala | 4 ++-- .../blockchain/core/BlockHeaderTest.scala | 6 +++--- .../fluency03/blockchain/core/BlockTest.scala | 8 ++++---- .../blockchain/core/BlockchainTest.scala | 6 +++--- .../blockchain/core/DifficultyTest.scala | 4 ++-- .../fluency03/blockchain/core/MerkleTest.scala | 6 +++--- .../fluency03/blockchain/core/PeerTest.scala | 2 +- .../blockchain/core/SingleWalletTest.scala | 4 ++-- .../blockchain/core/TransactionTest.scala | 4 ++-- 54 files changed, 143 insertions(+), 141 deletions(-) rename src/main/scala/com/{ => github}/fluency03/blockchain/Crypto.scala (98%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/JsonSupport.scala (87%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/Message.scala (80%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/Server.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/ActorSupport.scala (86%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/BlockPoolActor.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/BlockchainActor.scala (96%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/NetworkActor.scala (90%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/PeerActor.scala (86%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/actors/TxPoolActor.scala (90%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/package.scala (76%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/BlockPoolRoutes.scala (89%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/BlockchainRoutes.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/GenericRoutes.scala (93%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/NetworkRoutes.scala (89%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/RoutesSupport.scala (89%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/TxPoolRoutes.scala (90%) rename src/main/scala/com/{ => github}/fluency03/blockchain/api/routes/package.scala (97%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Block.scala (94%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/BlockHeader.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Blockchain.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Difficulty.scala (98%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Merkle.scala (92%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Peer.scala (67%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/SingleWallet.scala (80%) rename src/main/scala/com/{ => github}/fluency03/blockchain/core/Transaction.scala (96%) rename src/main/scala/com/{ => github}/fluency03/blockchain/package.scala (94%) delete mode 100644 src/test/scala/com/fluency03/blockchain/api/ServerTest.scala rename src/test/scala/com/{ => github}/fluency03/blockchain/CryptoTest.scala (91%) rename src/test/scala/com/{ => github}/fluency03/blockchain/UtilTest.scala (98%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/MessageTest.scala (92%) create mode 100644 src/test/scala/com/github/fluency03/blockchain/api/ServerTest.scala rename src/test/scala/com/{ => github}/fluency03/blockchain/api/actors/BlockPoolActorTest.scala (90%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/actors/BlockchainActorTest.scala (91%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/actors/NetworkActorTest.scala (90%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/actors/PeerActorTest.scala (86%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/actors/TxPoolActorTest.scala (87%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala (65%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala (65%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/GenericRoutesTest.scala (91%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/NetworkRoutesTest.scala (65%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/PackageTest.scala (87%) rename src/test/scala/com/{ => github}/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala (65%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/BlockHeaderTest.scala (92%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/BlockTest.scala (96%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/BlockchainTest.scala (95%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/DifficultyTest.scala (95%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/MerkleTest.scala (90%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/PeerTest.scala (90%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/SingleWalletTest.scala (92%) rename src/test/scala/com/{ => github}/fluency03/blockchain/core/TransactionTest.scala (98%) diff --git a/README.md b/README.md index 3e90347..4ba4261 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This project is meant to learn and understand Bitcoin and Blockchain. I personal Start the service, run this Class: ``` -com.fluency03.blockchain.api.Server +com.github.fluency03.blockchain.api.Server ``` ## REST APIs diff --git a/build.sbt b/build.sbt index 5e54ee7..eb63715 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ resolvers ++= Seq( "Artima Maven Repository" at "http://repo.artima.com/releases" ) -organization := "com.fluency03" +organization := "com.github.fluency03" name := "blockchain-in-scala" @@ -45,4 +45,4 @@ libraryDependencies ++= { } ++ httpDependencies ++ testDependencies -mainClass in assembly := Some("com.fluency03.blockchain.api.Server") +mainClass in assembly := Some("com.github.fluency03.blockchain.api.Server") diff --git a/project/plugins.sbt b/project/plugins.sbt index b34f37d..d8fc97a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,3 +7,5 @@ addSbtPlugin("com.artima.supersafe" %% "sbtplugin" % "1.1.3") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.4") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") diff --git a/src/main/scala/com/fluency03/blockchain/Crypto.scala b/src/main/scala/com/github/fluency03/blockchain/Crypto.scala similarity index 98% rename from src/main/scala/com/fluency03/blockchain/Crypto.scala rename to src/main/scala/com/github/fluency03/blockchain/Crypto.scala index 7ef002f..48976ed 100644 --- a/src/main/scala/com/fluency03/blockchain/Crypto.scala +++ b/src/main/scala/com/github/fluency03/blockchain/Crypto.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain import java.math.BigInteger import java.security._ diff --git a/src/main/scala/com/fluency03/blockchain/api/JsonSupport.scala b/src/main/scala/com/github/fluency03/blockchain/api/JsonSupport.scala similarity index 87% rename from src/main/scala/com/fluency03/blockchain/api/JsonSupport.scala rename to src/main/scala/com/github/fluency03/blockchain/api/JsonSupport.scala index f9cc4bf..ab34d78 100644 --- a/src/main/scala/com/fluency03/blockchain/api/JsonSupport.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/JsonSupport.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api +package com.github.fluency03.blockchain.api import de.heikoseeberger.akkahttpjson4s.Json4sSupport import org.json4s.native.Serialization diff --git a/src/main/scala/com/fluency03/blockchain/api/Message.scala b/src/main/scala/com/github/fluency03/blockchain/api/Message.scala similarity index 80% rename from src/main/scala/com/fluency03/blockchain/api/Message.scala rename to src/main/scala/com/github/fluency03/blockchain/api/Message.scala index 009208a..05ad624 100644 --- a/src/main/scala/com/fluency03/blockchain/api/Message.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/Message.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api +package com.github.fluency03.blockchain.api final case class Input(content: String) diff --git a/src/main/scala/com/fluency03/blockchain/api/Server.scala b/src/main/scala/com/github/fluency03/blockchain/api/Server.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/api/Server.scala rename to src/main/scala/com/github/fluency03/blockchain/api/Server.scala index 1fb7a5b..fbcf61d 100644 --- a/src/main/scala/com/fluency03/blockchain/api/Server.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/Server.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api +package com.github.fluency03.blockchain.api import akka.actor.{ActorRef, ActorSystem} import akka.event.Logging @@ -7,8 +7,8 @@ import akka.http.scaladsl.Http.ServerBinding import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.stream.ActorMaterializer -import com.fluency03.blockchain.api.actors._ -import com.fluency03.blockchain.api.routes._ +import com.github.fluency03.blockchain.api.actors._ +import com.github.fluency03.blockchain.api.routes._ import com.typesafe.config.ConfigFactory import scala.concurrent.{Await, ExecutionContextExecutor, Future} diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/ActorSupport.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/ActorSupport.scala similarity index 86% rename from src/main/scala/com/fluency03/blockchain/api/actors/ActorSupport.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/ActorSupport.scala index 659e52e..aee94a0 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/ActorSupport.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/ActorSupport.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{Actor, ActorLogging} import akka.util.Timeout diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/BlockPoolActor.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActor.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/api/actors/BlockPoolActor.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActor.scala index c6dfe51..cf408d9 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/BlockPoolActor.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActor.scala @@ -1,9 +1,9 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorSelection, Props} -import com.fluency03.blockchain.api.actors.BlockPoolActor._ -import com.fluency03.blockchain.api._ -import com.fluency03.blockchain.core.Block +import com.github.fluency03.blockchain.api.actors.BlockPoolActor._ +import com.github.fluency03.blockchain.api._ +import com.github.fluency03.blockchain.core.Block import scala.collection.mutable diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/BlockchainActor.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/BlockchainActor.scala similarity index 96% rename from src/main/scala/com/fluency03/blockchain/api/actors/BlockchainActor.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/BlockchainActor.scala index 4dbad1e..0fb08fb 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/BlockchainActor.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/BlockchainActor.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSelection, Props} import akka.pattern.ask -import com.fluency03.blockchain.api.actors.BlockchainActor._ -import com.fluency03.blockchain.api._ -import com.fluency03.blockchain.core.{Block, Blockchain, Transaction} +import com.github.fluency03.blockchain.api.actors.BlockchainActor._ +import com.github.fluency03.blockchain.api._ +import com.github.fluency03.blockchain.core.{Block, Blockchain, Transaction} import scala.collection.mutable import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/NetworkActor.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/NetworkActor.scala similarity index 90% rename from src/main/scala/com/fluency03/blockchain/api/actors/NetworkActor.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/NetworkActor.scala index 8ecd406..47983c7 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/NetworkActor.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/NetworkActor.scala @@ -1,11 +1,11 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorSelection, Props} import akka.pattern.{ask, pipe} -import com.fluency03.blockchain.api._ -import com.fluency03.blockchain.api.actors.NetworkActor._ -import com.fluency03.blockchain.api.actors.PeerActor.GetPublicKeys -import com.fluency03.blockchain.core.Peer +import com.github.fluency03.blockchain.api._ +import com.github.fluency03.blockchain.api.actors.NetworkActor._ +import com.github.fluency03.blockchain.api.actors.PeerActor.GetPublicKeys +import com.github.fluency03.blockchain.core.Peer import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/PeerActor.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/PeerActor.scala similarity index 86% rename from src/main/scala/com/fluency03/blockchain/api/actors/PeerActor.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/PeerActor.scala index 4a42225..dbbe562 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/PeerActor.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/PeerActor.scala @@ -1,11 +1,11 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package api.actors import java.security.KeyPair import akka.actor.Props -import com.fluency03.blockchain.api.actors.PeerActor._ -import com.fluency03.blockchain.core.{Peer, SingleWallet} +import com.github.fluency03.blockchain.api.actors.PeerActor._ +import com.github.fluency03.blockchain.core.{Peer, SingleWallet} import scala.collection.mutable diff --git a/src/main/scala/com/fluency03/blockchain/api/actors/TxPoolActor.scala b/src/main/scala/com/github/fluency03/blockchain/api/actors/TxPoolActor.scala similarity index 90% rename from src/main/scala/com/fluency03/blockchain/api/actors/TxPoolActor.scala rename to src/main/scala/com/github/fluency03/blockchain/api/actors/TxPoolActor.scala index c922a51..cc6e91a 100644 --- a/src/main/scala/com/fluency03/blockchain/api/actors/TxPoolActor.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/actors/TxPoolActor.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorSelection, Props} -import com.fluency03.blockchain.api.actors.TxPoolActor._ -import com.fluency03.blockchain.api._ -import com.fluency03.blockchain.core.{Outpoint, Transaction, TxOut} -import com.fluency03.blockchain.core.Transaction.hashOfTransaction +import com.github.fluency03.blockchain.api.actors.TxPoolActor._ +import com.github.fluency03.blockchain.api._ +import com.github.fluency03.blockchain.core.{Outpoint, Transaction, TxOut} +import com.github.fluency03.blockchain.core.Transaction.hashOfTransaction import scala.collection.mutable diff --git a/src/main/scala/com/fluency03/blockchain/api/package.scala b/src/main/scala/com/github/fluency03/blockchain/api/package.scala similarity index 76% rename from src/main/scala/com/fluency03/blockchain/api/package.scala rename to src/main/scala/com/github/fluency03/blockchain/api/package.scala index 0ed440c..8c0cc3d 100644 --- a/src/main/scala/com/fluency03/blockchain/api/package.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/package.scala @@ -1,6 +1,6 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain -import com.fluency03.blockchain.core.{Block, Peer, Transaction} +import com.github.fluency03.blockchain.core.{Block, Peer, Transaction} package object api { diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutes.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutes.scala similarity index 89% rename from src/main/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutes.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutes.scala index 9c7ed3b..6cd0d26 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutes.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutes.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.actor.ActorRef import akka.event.Logging @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path import akka.http.scaladsl.server.directives.RouteDirectives.complete import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq import akka.pattern.ask -import com.fluency03.blockchain.api.{Blocks, Message} -import com.fluency03.blockchain.api.actors.BlockPoolActor._ -import com.fluency03.blockchain.core.{Block, Transaction} +import com.github.fluency03.blockchain.api.{Blocks, Message} +import com.github.fluency03.blockchain.api.actors.BlockPoolActor._ +import com.github.fluency03.blockchain.core.{Block, Transaction} import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/BlockchainRoutes.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutes.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/api/routes/BlockchainRoutes.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutes.scala index 4d505f5..4eb1cf9 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/BlockchainRoutes.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutes.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.actor.ActorRef import akka.event.Logging @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.MethodDirectives.{delete, get, post} import akka.http.scaladsl.server.directives.RouteDirectives.complete import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq import akka.pattern.ask -import com.fluency03.blockchain.api.{FailureMsg, Input, Message} -import com.fluency03.blockchain.api.actors.BlockchainActor._ -import com.fluency03.blockchain.core.{Block, Blockchain, Transaction} +import com.github.fluency03.blockchain.api.{FailureMsg, Input, Message} +import com.github.fluency03.blockchain.api.actors.BlockchainActor._ +import com.github.fluency03.blockchain.core.{Block, Blockchain, Transaction} import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/GenericRoutes.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/GenericRoutes.scala similarity index 93% rename from src/main/scala/com/fluency03/blockchain/api/routes/GenericRoutes.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/GenericRoutes.scala index 46cc9b3..7b83604 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/GenericRoutes.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/GenericRoutes.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package api.routes import java.time.Instant @@ -8,7 +8,7 @@ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.directives.MethodDirectives.post import akka.http.scaladsl.server.directives.RouteDirectives.complete -import com.fluency03.blockchain.api.{Input, SuccessMsg} +import com.github.fluency03.blockchain.api.{Input, SuccessMsg} trait GenericRoutes extends RoutesSupport { lazy val log = Logging(system, classOf[GenericRoutes]) diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/NetworkRoutes.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutes.scala similarity index 89% rename from src/main/scala/com/fluency03/blockchain/api/routes/NetworkRoutes.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutes.scala index ecc023e..2cacceb 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/NetworkRoutes.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutes.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.actor.ActorRef import akka.event.Logging @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path import akka.http.scaladsl.server.directives.RouteDirectives.complete import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq import akka.pattern.ask -import com.fluency03.blockchain.api.Message -import com.fluency03.blockchain.api.actors.NetworkActor._ -import com.fluency03.blockchain.core.{Peer, PeerSimple} +import com.github.fluency03.blockchain.api.Message +import com.github.fluency03.blockchain.api.actors.NetworkActor._ +import com.github.fluency03.blockchain.core.{Peer, PeerSimple} import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/RoutesSupport.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/RoutesSupport.scala similarity index 89% rename from src/main/scala/com/fluency03/blockchain/api/routes/RoutesSupport.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/RoutesSupport.scala index 9cc3b71..1257809 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/RoutesSupport.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/RoutesSupport.scala @@ -1,11 +1,11 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.actor.ActorSystem import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.{RequestContext, StandardRoute} import akka.http.scaladsl.server.directives.RouteDirectives.complete import akka.util.Timeout -import com.fluency03.blockchain.api.{FailureMsg, JsonSupport, Message, SuccessMsg} +import com.github.fluency03.blockchain.api.{FailureMsg, JsonSupport, Message, SuccessMsg} import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/TxPoolRoutes.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutes.scala similarity index 90% rename from src/main/scala/com/fluency03/blockchain/api/routes/TxPoolRoutes.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutes.scala index 260894e..8362964 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/TxPoolRoutes.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutes.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.actor.ActorRef import akka.event.Logging @@ -10,9 +10,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path import akka.http.scaladsl.server.directives.RouteDirectives.complete import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq import akka.pattern.ask -import com.fluency03.blockchain.api.actors.TxPoolActor._ -import com.fluency03.blockchain.api.{FailureMsg, Message, Transactions} -import com.fluency03.blockchain.core.Transaction +import com.github.fluency03.blockchain.api.actors.TxPoolActor._ +import com.github.fluency03.blockchain.api.{FailureMsg, Message, Transactions} +import com.github.fluency03.blockchain.core.Transaction import scala.concurrent.Future diff --git a/src/main/scala/com/fluency03/blockchain/api/routes/package.scala b/src/main/scala/com/github/fluency03/blockchain/api/routes/package.scala similarity index 97% rename from src/main/scala/com/fluency03/blockchain/api/routes/package.scala rename to src/main/scala/com/github/fluency03/blockchain/api/routes/package.scala index 78d1c84..ab3165b 100644 --- a/src/main/scala/com/fluency03/blockchain/api/routes/package.scala +++ b/src/main/scala/com/github/fluency03/blockchain/api/routes/package.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api +package com.github.fluency03.blockchain.api import akka.http.scaladsl.model.{StatusCode, StatusCodes} diff --git a/src/main/scala/com/fluency03/blockchain/core/Block.scala b/src/main/scala/com/github/fluency03/blockchain/core/Block.scala similarity index 94% rename from src/main/scala/com/fluency03/blockchain/core/Block.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Block.scala index 1036f0e..f2eab8f 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Block.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Block.scala @@ -1,9 +1,9 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.Block.allTransValidOf -import com.fluency03.blockchain.core.BlockHeader.hashOfHeaderFields -import com.fluency03.blockchain.core.Transaction.{createCoinbaseTx, validateCoinbaseTx, noDuplicateTxInOf} +import com.github.fluency03.blockchain.core.Block.allTransValidOf +import com.github.fluency03.blockchain.core.BlockHeader.hashOfHeaderFields +import com.github.fluency03.blockchain.core.Transaction.{createCoinbaseTx, validateCoinbaseTx, noDuplicateTxInOf} import org.json4s.native.JsonMethods.{compact, render} import org.json4s.{Extraction, JValue} diff --git a/src/main/scala/com/fluency03/blockchain/core/BlockHeader.scala b/src/main/scala/com/github/fluency03/blockchain/core/BlockHeader.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/core/BlockHeader.scala rename to src/main/scala/com/github/fluency03/blockchain/core/BlockHeader.scala index 73e30b0..7ab24d4 100644 --- a/src/main/scala/com/fluency03/blockchain/core/BlockHeader.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/BlockHeader.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader +import com.github.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader import org.json4s.native.JsonMethods.{compact, render} import org.json4s.{Extraction, JValue} diff --git a/src/main/scala/com/fluency03/blockchain/core/Blockchain.scala b/src/main/scala/com/github/fluency03/blockchain/core/Blockchain.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/core/Blockchain.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Blockchain.scala index 6c88ee6..76472da 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Blockchain.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Blockchain.scala @@ -1,8 +1,8 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.Block.validLinkBetween -import com.fluency03.blockchain.core.Blockchain._ +import com.github.fluency03.blockchain.core.Block.validLinkBetween +import com.github.fluency03.blockchain.core.Blockchain._ import org.json4s.native.JsonMethods.{compact, render} import org.json4s.{Extraction, JValue} diff --git a/src/main/scala/com/fluency03/blockchain/core/Difficulty.scala b/src/main/scala/com/github/fluency03/blockchain/core/Difficulty.scala similarity index 98% rename from src/main/scala/com/fluency03/blockchain/core/Difficulty.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Difficulty.scala index 9328238..f5e4ce9 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Difficulty.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Difficulty.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core object Difficulty { diff --git a/src/main/scala/com/fluency03/blockchain/core/Merkle.scala b/src/main/scala/com/github/fluency03/blockchain/core/Merkle.scala similarity index 92% rename from src/main/scala/com/fluency03/blockchain/core/Merkle.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Merkle.scala index e486630..b8ad456 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Merkle.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Merkle.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core import scala.annotation.tailrec diff --git a/src/main/scala/com/fluency03/blockchain/core/Peer.scala b/src/main/scala/com/github/fluency03/blockchain/core/Peer.scala similarity index 67% rename from src/main/scala/com/fluency03/blockchain/core/Peer.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Peer.scala index 69c24fb..dac19ec 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Peer.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Peer.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.core +package com.github.fluency03.blockchain.core case class PeerSimple(name: String) case class Peer(name: String, publicKeys: Set[String]) diff --git a/src/main/scala/com/fluency03/blockchain/core/SingleWallet.scala b/src/main/scala/com/github/fluency03/blockchain/core/SingleWallet.scala similarity index 80% rename from src/main/scala/com/fluency03/blockchain/core/SingleWallet.scala rename to src/main/scala/com/github/fluency03/blockchain/core/SingleWallet.scala index f881baa..d6b05af 100644 --- a/src/main/scala/com/fluency03/blockchain/core/SingleWallet.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/SingleWallet.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core import java.security.KeyPair -import com.fluency03.blockchain.core.SingleWallet.balanceOfWallet -import com.fluency03.blockchain.core.Transaction.signTxIn +import com.github.fluency03.blockchain.core.SingleWallet.balanceOfWallet +import com.github.fluency03.blockchain.core.Transaction.signTxIn import scala.collection.mutable diff --git a/src/main/scala/com/fluency03/blockchain/core/Transaction.scala b/src/main/scala/com/github/fluency03/blockchain/core/Transaction.scala similarity index 96% rename from src/main/scala/com/fluency03/blockchain/core/Transaction.scala rename to src/main/scala/com/github/fluency03/blockchain/core/Transaction.scala index 73d3c0d..b9cbd75 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Transaction.scala +++ b/src/main/scala/com/github/fluency03/blockchain/core/Transaction.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core import java.security.KeyPair -import com.fluency03.blockchain.Crypto.recoverPublicKey -import com.fluency03.blockchain.core.Transaction.{hashOfTransaction, validateTransaction} +import com.github.fluency03.blockchain.Crypto.recoverPublicKey +import com.github.fluency03.blockchain.core.Transaction.{hashOfTransaction, validateTransaction} import org.json4s.native.JsonMethods.{compact, render} import org.json4s.{Extraction, JValue} diff --git a/src/main/scala/com/fluency03/blockchain/package.scala b/src/main/scala/com/github/fluency03/blockchain/package.scala similarity index 94% rename from src/main/scala/com/fluency03/blockchain/package.scala rename to src/main/scala/com/github/fluency03/blockchain/package.scala index d947e31..c4b8d63 100644 --- a/src/main/scala/com/fluency03/blockchain/package.scala +++ b/src/main/scala/com/github/fluency03/blockchain/package.scala @@ -1,11 +1,11 @@ -package com.fluency03 +package com.github.fluency03 import java.nio.charset.Charset import java.security.{MessageDigest, PrivateKey, PublicKey} import java.time.Instant -import com.fluency03.blockchain.Crypto.{privateKeyToHex, publicKeyToHex} -import com.fluency03.blockchain.core.{Peer, PeerSimple, TxIn, TxOut} +import com.github.fluency03.blockchain.Crypto.{privateKeyToHex, publicKeyToHex} +import com.github.fluency03.blockchain.core.{Peer, PeerSimple, TxIn, TxOut} import org.bouncycastle.util.encoders.{Base64, Hex} import org.json4s.native.Serialization import org.json4s.{Formats, NoTypeHints} diff --git a/src/test/scala/com/fluency03/blockchain/api/ServerTest.scala b/src/test/scala/com/fluency03/blockchain/api/ServerTest.scala deleted file mode 100644 index a06f795..0000000 --- a/src/test/scala/com/fluency03/blockchain/api/ServerTest.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.fluency03.blockchain.api - -class ServerTest { - -} diff --git a/src/test/scala/com/fluency03/blockchain/CryptoTest.scala b/src/test/scala/com/github/fluency03/blockchain/CryptoTest.scala similarity index 91% rename from src/test/scala/com/fluency03/blockchain/CryptoTest.scala rename to src/test/scala/com/github/fluency03/blockchain/CryptoTest.scala index 477a4e4..fc19e38 100644 --- a/src/test/scala/com/fluency03/blockchain/CryptoTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/CryptoTest.scala @@ -1,6 +1,6 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain -import com.fluency03.blockchain.Crypto._ +import com.github.fluency03.blockchain.Crypto._ import java.security.KeyPair diff --git a/src/test/scala/com/fluency03/blockchain/UtilTest.scala b/src/test/scala/com/github/fluency03/blockchain/UtilTest.scala similarity index 98% rename from src/test/scala/com/fluency03/blockchain/UtilTest.scala rename to src/test/scala/com/github/fluency03/blockchain/UtilTest.scala index 3224542..f7f3f00 100644 --- a/src/test/scala/com/fluency03/blockchain/UtilTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/UtilTest.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain import java.time.format.DateTimeParseException diff --git a/src/test/scala/com/fluency03/blockchain/api/MessageTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/MessageTest.scala similarity index 92% rename from src/test/scala/com/fluency03/blockchain/api/MessageTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/MessageTest.scala index fc6c8db..4771a3b 100644 --- a/src/test/scala/com/fluency03/blockchain/api/MessageTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/MessageTest.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.api +package com.github.fluency03.blockchain.api import org.scalatest.{FlatSpec, Matchers} diff --git a/src/test/scala/com/github/fluency03/blockchain/api/ServerTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/ServerTest.scala new file mode 100644 index 0000000..e4e465a --- /dev/null +++ b/src/test/scala/com/github/fluency03/blockchain/api/ServerTest.scala @@ -0,0 +1,5 @@ +package com.github.fluency03.blockchain.api + +class ServerTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/BlockPoolActorTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActorTest.scala similarity index 90% rename from src/test/scala/com/fluency03/blockchain/api/actors/BlockPoolActorTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActorTest.scala index cbd5bd8..6df0ddd 100644 --- a/src/test/scala/com/fluency03/blockchain/api/actors/BlockPoolActorTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/actors/BlockPoolActorTest.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSystem, Props} import akka.testkit.{ImplicitSender, TestKit} -import com.fluency03.blockchain.api.actors.BlockPoolActor._ -import com.fluency03.blockchain.api.{FailureMsg, SuccessMsg} -import com.fluency03.blockchain.core.Block +import com.github.fluency03.blockchain.api.actors.BlockPoolActor._ +import com.github.fluency03.blockchain.api.{FailureMsg, SuccessMsg} +import com.github.fluency03.blockchain.core.Block import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} class BlockPoolActorTest extends TestKit(ActorSystem("BlocksActorTest")) with ImplicitSender diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/actors/BlockchainActorTest.scala similarity index 91% rename from src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/actors/BlockchainActorTest.scala index 97adf3a..6562f74 100644 --- a/src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/actors/BlockchainActorTest.scala @@ -1,14 +1,14 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSystem, Props} import akka.testkit.{DefaultTimeout, ImplicitSender, TestKit} -import com.fluency03.blockchain.api.actors.BlockPoolActor.AddBlock -import com.fluency03.blockchain.api.actors.BlockchainActor._ -import com.fluency03.blockchain.api._ -import com.fluency03.blockchain.api.actors.TxPoolActor.AddTransaction -import com.fluency03.blockchain.core.Transaction.createCoinbaseTx -import com.fluency03.blockchain.core.{Block, Blockchain, Transaction} -import com.fluency03.blockchain.{genesisMiner, genesisTimestamp} +import com.github.fluency03.blockchain.api.actors.BlockPoolActor.AddBlock +import com.github.fluency03.blockchain.api.actors.BlockchainActor._ +import com.github.fluency03.blockchain.api._ +import com.github.fluency03.blockchain.api.actors.TxPoolActor.AddTransaction +import com.github.fluency03.blockchain.core.Transaction.createCoinbaseTx +import com.github.fluency03.blockchain.core.{Block, Blockchain, Transaction} +import com.github.fluency03.blockchain.{genesisMiner, genesisTimestamp} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} import scala.concurrent.duration._ diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/NetworkActorTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/actors/NetworkActorTest.scala similarity index 90% rename from src/test/scala/com/fluency03/blockchain/api/actors/NetworkActorTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/actors/NetworkActorTest.scala index 2e78763..8af560e 100644 --- a/src/test/scala/com/fluency03/blockchain/api/actors/NetworkActorTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/actors/NetworkActorTest.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSystem, Props} import akka.testkit.{ImplicitSender, TestKit} -import com.fluency03.blockchain.api.actors.NetworkActor._ -import com.fluency03.blockchain.api.{FailureMsg, SuccessMsg} -import com.fluency03.blockchain.core.Peer +import com.github.fluency03.blockchain.api.actors.NetworkActor._ +import com.github.fluency03.blockchain.api.{FailureMsg, SuccessMsg} +import com.github.fluency03.blockchain.core.Peer import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} class NetworkActorTest extends TestKit(ActorSystem("NetworkActorTest")) with ImplicitSender diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/PeerActorTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/actors/PeerActorTest.scala similarity index 86% rename from src/test/scala/com/fluency03/blockchain/api/actors/PeerActorTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/actors/PeerActorTest.scala index cf8706c..b84204b 100644 --- a/src/test/scala/com/fluency03/blockchain/api/actors/PeerActorTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/actors/PeerActorTest.scala @@ -1,8 +1,8 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSystem, Props} import akka.testkit.{ImplicitSender, TestKit} -import com.fluency03.blockchain.api.actors.PeerActor.{CreateWallet, GetPublicKeys} +import com.github.fluency03.blockchain.api.actors.PeerActor.{CreateWallet, GetPublicKeys} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} class PeerActorTest extends TestKit(ActorSystem("PeerActorTest")) with ImplicitSender diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/TxPoolActorTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/actors/TxPoolActorTest.scala similarity index 87% rename from src/test/scala/com/fluency03/blockchain/api/actors/TxPoolActorTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/actors/TxPoolActorTest.scala index 00aceed..3cf7d96 100644 --- a/src/test/scala/com/fluency03/blockchain/api/actors/TxPoolActorTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/actors/TxPoolActorTest.scala @@ -1,12 +1,12 @@ -package com.fluency03.blockchain.api.actors +package com.github.fluency03.blockchain.api.actors import akka.actor.{ActorRef, ActorSystem, Props} import akka.testkit.{ImplicitSender, TestKit} -import com.fluency03.blockchain.api.actors.TxPoolActor._ -import com.fluency03.blockchain.api.{FailureMsg, SuccessMsg} -import com.fluency03.blockchain.core.{Transaction, TxIn, TxOut} -import com.fluency03.blockchain.core.Transaction.{createCoinbaseTx, hashOfTransaction} -import com.fluency03.blockchain.{genesisMiner, genesisTimestamp} +import com.github.fluency03.blockchain.api.actors.TxPoolActor._ +import com.github.fluency03.blockchain.api.{FailureMsg, SuccessMsg} +import com.github.fluency03.blockchain.core.{Transaction, TxIn, TxOut} +import com.github.fluency03.blockchain.core.Transaction.{createCoinbaseTx, hashOfTransaction} +import com.github.fluency03.blockchain.{genesisMiner, genesisTimestamp} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} class TxPoolActorTest extends TestKit(ActorSystem("TransactionsActorTest")) with ImplicitSender diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala similarity index 65% rename from src/test/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala index 84d6dda..7db54ca 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/BlockPoolRoutesTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.testkit.ScalatestRouteTest -import com.fluency03.blockchain.api.JsonSupport +import com.github.fluency03.blockchain.api.JsonSupport import org.scalatest.{Matchers, WordSpec} class BlockPoolRoutesTest extends WordSpec with Matchers with ScalatestRouteTest with JsonSupport { diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala similarity index 65% rename from src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala index ed3a460..27d93a1 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.testkit.ScalatestRouteTest -import com.fluency03.blockchain.api.JsonSupport +import com.github.fluency03.blockchain.api.JsonSupport import org.scalatest.{Matchers, WordSpec} class BlockchainRoutesTest extends WordSpec with Matchers with ScalatestRouteTest with JsonSupport { diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/GenericRoutesTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/GenericRoutesTest.scala similarity index 91% rename from src/test/scala/com/fluency03/blockchain/api/routes/GenericRoutesTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/GenericRoutesTest.scala index 7b3e445..64a098b 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/GenericRoutesTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/GenericRoutesTest.scala @@ -1,10 +1,10 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.testkit.ScalatestRouteTest -import com.fluency03.blockchain.api.{Input, JsonSupport, SuccessMsg} +import com.github.fluency03.blockchain.api.{Input, JsonSupport, SuccessMsg} import org.scalatest.{Matchers, WordSpec} -import com.fluency03.blockchain.api.Server.genericRoutes +import com.github.fluency03.blockchain.api.Server.genericRoutes class GenericRoutesTest extends WordSpec with Matchers with ScalatestRouteTest with JsonSupport { diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/NetworkRoutesTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutesTest.scala similarity index 65% rename from src/test/scala/com/fluency03/blockchain/api/routes/NetworkRoutesTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutesTest.scala index 28e9567..8f4a834 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/NetworkRoutesTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/NetworkRoutesTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.testkit.ScalatestRouteTest -import com.fluency03.blockchain.api.JsonSupport +import com.github.fluency03.blockchain.api.JsonSupport import org.scalatest.{Matchers, WordSpec} class NetworkRoutesTest extends WordSpec with Matchers with ScalatestRouteTest with JsonSupport { diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/PackageTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/PackageTest.scala similarity index 87% rename from src/test/scala/com/fluency03/blockchain/api/routes/PackageTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/PackageTest.scala index 7bdd92c..badba16 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/PackageTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/PackageTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.model.StatusCodes -import com.fluency03.blockchain.api.{FailureMsg, SuccessMsg} +import com.github.fluency03.blockchain.api.{FailureMsg, SuccessMsg} import org.scalatest.{FlatSpec, Matchers} class PackageTest extends FlatSpec with Matchers { diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala b/src/test/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala similarity index 65% rename from src/test/scala/com/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala rename to src/test/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala index 336a9bf..afadd39 100644 --- a/src/test/scala/com/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/api/routes/TxPoolRoutesTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain.api.routes +package com.github.fluency03.blockchain.api.routes import akka.http.scaladsl.testkit.ScalatestRouteTest -import com.fluency03.blockchain.api.JsonSupport +import com.github.fluency03.blockchain.api.JsonSupport import org.scalatest.{Matchers, WordSpec} class TxPoolRoutesTest extends WordSpec with Matchers with ScalatestRouteTest with JsonSupport { diff --git a/src/test/scala/com/fluency03/blockchain/core/BlockHeaderTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/BlockHeaderTest.scala similarity index 92% rename from src/test/scala/com/fluency03/blockchain/core/BlockHeaderTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/BlockHeaderTest.scala index 9ac5b42..8114501 100644 --- a/src/test/scala/com/fluency03/blockchain/core/BlockHeaderTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/BlockHeaderTest.scala @@ -1,8 +1,8 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader -import com.fluency03.blockchain.core.Transaction.createCoinbaseTx +import com.github.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader +import com.github.fluency03.blockchain.core.Transaction.createCoinbaseTx import org.json4s.JValue import org.json4s.JsonAST.JInt import org.json4s.native.JsonMethods.parse diff --git a/src/test/scala/com/fluency03/blockchain/core/BlockTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/BlockTest.scala similarity index 96% rename from src/test/scala/com/fluency03/blockchain/core/BlockTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/BlockTest.scala index 5d2bbb1..27fbb40 100644 --- a/src/test/scala/com/fluency03/blockchain/core/BlockTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/BlockTest.scala @@ -1,11 +1,11 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core import java.security.KeyPair -import com.fluency03.blockchain.core.Block.allTransValidOf -import com.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader -import com.fluency03.blockchain.core.Transaction.{COINBASE_AMOUNT, createCoinbaseTx, signTxIn, updateUTxOs} +import com.github.fluency03.blockchain.core.Block.allTransValidOf +import com.github.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader +import com.github.fluency03.blockchain.core.Transaction.{COINBASE_AMOUNT, createCoinbaseTx, signTxIn, updateUTxOs} import org.json4s.JValue import org.json4s.JsonAST.{JArray, JInt, JObject, JString} import org.json4s.JsonDSL._ diff --git a/src/test/scala/com/fluency03/blockchain/core/BlockchainTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/BlockchainTest.scala similarity index 95% rename from src/test/scala/com/fluency03/blockchain/core/BlockchainTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/BlockchainTest.scala index 81825a4..eba2d1f 100644 --- a/src/test/scala/com/fluency03/blockchain/core/BlockchainTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/BlockchainTest.scala @@ -1,8 +1,8 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.Blockchain.isValidChain -import com.fluency03.blockchain.core.Transaction.createCoinbaseTx +import com.github.fluency03.blockchain.core.Blockchain.isValidChain +import com.github.fluency03.blockchain.core.Transaction.createCoinbaseTx import org.json4s.JsonDSL._ import org.json4s.JValue import org.json4s.JsonAST.JArray diff --git a/src/test/scala/com/fluency03/blockchain/core/DifficultyTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/DifficultyTest.scala similarity index 95% rename from src/test/scala/com/fluency03/blockchain/core/DifficultyTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/DifficultyTest.scala index 1dd6170..fd0115d 100644 --- a/src/test/scala/com/fluency03/blockchain/core/DifficultyTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/DifficultyTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.Difficulty._ +import com.github.fluency03.blockchain.core.Difficulty._ import org.scalatest.{FlatSpec, Matchers} class DifficultyTest extends FlatSpec with Matchers { diff --git a/src/test/scala/com/fluency03/blockchain/core/MerkleTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/MerkleTest.scala similarity index 90% rename from src/test/scala/com/fluency03/blockchain/core/MerkleTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/MerkleTest.scala index 7a5c20a..257cdc6 100644 --- a/src/test/scala/com/fluency03/blockchain/core/MerkleTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/MerkleTest.scala @@ -1,8 +1,8 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.Merkle._ -import com.fluency03.blockchain.core.Transaction.createCoinbaseTx +import com.github.fluency03.blockchain.core.Merkle._ +import com.github.fluency03.blockchain.core.Transaction.createCoinbaseTx import org.scalatest.{FlatSpec, Matchers} class MerkleTest extends FlatSpec with Matchers { diff --git a/src/test/scala/com/fluency03/blockchain/core/PeerTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/PeerTest.scala similarity index 90% rename from src/test/scala/com/fluency03/blockchain/core/PeerTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/PeerTest.scala index 619c589..e364e0b 100644 --- a/src/test/scala/com/fluency03/blockchain/core/PeerTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/PeerTest.scala @@ -1,4 +1,4 @@ -package com.fluency03.blockchain.core +package com.github.fluency03.blockchain.core import org.scalatest.{FlatSpec, Matchers} diff --git a/src/test/scala/com/fluency03/blockchain/core/SingleWalletTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/SingleWalletTest.scala similarity index 92% rename from src/test/scala/com/fluency03/blockchain/core/SingleWalletTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/SingleWalletTest.scala index b776bb7..3463d44 100644 --- a/src/test/scala/com/fluency03/blockchain/core/SingleWalletTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/SingleWalletTest.scala @@ -1,7 +1,7 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core -import com.fluency03.blockchain.core.SingleWallet._ +import com.github.fluency03.blockchain.core.SingleWallet._ import org.scalatest.{FlatSpec, Matchers} diff --git a/src/test/scala/com/fluency03/blockchain/core/TransactionTest.scala b/src/test/scala/com/github/fluency03/blockchain/core/TransactionTest.scala similarity index 98% rename from src/test/scala/com/fluency03/blockchain/core/TransactionTest.scala rename to src/test/scala/com/github/fluency03/blockchain/core/TransactionTest.scala index dd0020a..1071396 100644 --- a/src/test/scala/com/fluency03/blockchain/core/TransactionTest.scala +++ b/src/test/scala/com/github/fluency03/blockchain/core/TransactionTest.scala @@ -1,9 +1,9 @@ -package com.fluency03.blockchain +package com.github.fluency03.blockchain package core import java.security.KeyPair -import com.fluency03.blockchain.core.Transaction._ +import com.github.fluency03.blockchain.core.Transaction._ import org.json4s.JValue import org.json4s.native.JsonMethods.parse import org.scalatest.{FlatSpec, Matchers}