Skip to content

Commit

Permalink
server: Disable deprecated endpoints
Browse files Browse the repository at this point in the history
Those endpoints are slow while dealing with lots of data.
  • Loading branch information
AlexITC committed May 1, 2019
1 parent 9ebea5d commit 44e81c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GET /transactions/:txid/raw controllers.TransactionsController.getRawTransa
POST /transactions controllers.TransactionsController.sendRawTransaction()

GET /addresses/:address controllers.AddressesController.getBy(address: String)
GET /addresses/:address/transactions controllers.AddressesController.getTransactions(address: String, offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
# GET /addresses/:address/transactions controllers.AddressesController.getTransactions(address: String, offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
GET /addresses/:address/tposcontracts controllers.AddressesController.getTPoSContracts(address: String)
GET /v2/addresses/:address/transactions controllers.AddressesController.getLightWalletTransactions(address: String, limit: Int ?= 10, lastSeenTxid: Option[String], order: String ?= "desc")
GET /addresses/:address/utxos controllers.AddressesController.getUnspentOutputs(address: String)
Expand All @@ -22,13 +22,13 @@ GET /blocks/estimate-fee controllers.BlocksController.estimateFe

GET /blocks/:query controllers.BlocksController.getDetails(query: String)
GET /blocks/:query/raw controllers.BlocksController.getRawBlock(query: String)
GET /blocks/:blockhash/transactions controllers.BlocksController.getTransactions(blockhash: String, offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
# GET /blocks/:blockhash/transactions controllers.BlocksController.getTransactions(blockhash: String, offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
GET /v2/blocks/:blockhash/transactions controllers.BlocksController.getTransactionsV2(blockhash: String, limit: Int ?= 10, lastSeenTxid: Option[String])
GET /v2/blocks/:blockhash/light-wallet-transactions controllers.BlocksController.getLightTransactionsV2(blockhash: String, limit: Int ?= 10, lastSeenTxid: Option[String])

GET /stats controllers.StatisticsController.getStatus()

GET /balances controllers.BalancesController.get(offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
# GET /balances controllers.BalancesController.get(offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
GET /v2/balances controllers.BalancesController.getHighest(limit: Int ?= 10, lastSeenAddress: Option[String])

GET /masternodes controllers.MasternodesController.get(offset: Int ?= 0, limit: Int ?= 10, orderBy: String ?= "")
Expand Down
1 change: 1 addition & 0 deletions server/test/controllers/AddressesControllerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class AddressesControllerSpec extends MyAPISpec {
def url(address: String, offset: Int, limit: Int) = s"/addresses/$address/transactions?offset=$offset&limit=$limit"

"return the transactions where the address was involved" in {
pending
val offset = 0
val limit = 5
val response = GET(url(addressForTransactions.string, offset, limit))
Expand Down
2 changes: 2 additions & 0 deletions server/test/controllers/BalancesControllerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class BalancesControllerSpec extends MyAPISpec {

"GET /balances" should {
"get the richest addresses" in {
pending

val query = PaginatedQuery(Offset(1), Limit(2))
val expected1 = balances(1)
val expected2 = balances(2)
Expand Down
2 changes: 2 additions & 0 deletions server/test/controllers/BlocksControllerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ class BlocksControllerSpec extends MyAPISpec {

"GET /blocks/:blockhash/transactions" should {
"return the transactions for the given block" in {
pending

val blockhash = Blockhash.from("000003fb382f6892ae96594b81aa916a8923c70701de4e7054aac556c7271ef7").get

val result = {
Expand Down

0 comments on commit 44e81c2

Please sign in to comment.