pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
209 stars 103 forks source link

Update the `TestApplication_CalculateAppRelays` test #1537

Closed Olshansk closed 1 year ago

Olshansk commented 1 year ago

Description

This test is a followup to an offline discussion related to how application relays are computed.

Changes

Updating TestApplication_CalculateAppRelays to reflect:

Screenshot 2023-03-29 at 7 32 47 PM

Context

Helpers

export POCKET_ENDPOINT=https://user>:<password>@<host:

Listing all params

curl --data '{"height": 90074}' --location -X 'POST' -H 'Content-Type: application/json' "${POCKET_ENDPOINT}/v1/query/allParams" | jq

Listing all app stakes in descending order

curl --data '{"height": 90074, "opts": {"per_page":3000 } }' --location -X 'POST' -H 'Content-Type: application/json' "${POCKET_ENDPOINT}/v1/query/apps" | jq -r '.result | map({staked_tokens: .staked_tokens | tonumber}) | sort_by(-.staked_tokens) | .[].staked_tokens'

Screenshot 2023-03-30 at 11 27 38 AM

reviewpad[bot] commented 1 year ago

Reviewpad Report

:bangbang: Errors

:warning: Warnings