Browse Source

server: Disable deprecated endpoints

Those endpoints are slow while dealing with lots of data.
develop
Alexis Hernandez 6 years ago
parent
commit
44e81c2c02
  1. 6
      server/conf/routes
  2. 1
      server/test/controllers/AddressesControllerSpec.scala
  3. 2
      server/test/controllers/BalancesControllerSpec.scala
  4. 2
      server/test/controllers/BlocksControllerSpec.scala

6
server/conf/routes

@ -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)
@ -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 ?= "")

1
server/test/controllers/AddressesControllerSpec.scala

@ -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))

2
server/test/controllers/BalancesControllerSpec.scala

@ -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)

2
server/test/controllers/BlocksControllerSpec.scala

@ -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 = {

Loading…
Cancel
Save