Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

chain: added moniker to delegations view table #1901

Merged
merged 4 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Chain

- (impv) [\#1901](https://github.com/bandprotocol/bandchain/pull/1901) Added `moniker` field to `delegations_view` table.
- (feat) [\#1879](https://github.com/bandprotocol/bandchain/pull/1879) Keep `Request` and `Report` around. We avoid premature optimization at the moment.
- (feat) [\#1873](https://github.com/bandprotocol/bandchain/pull/1873) Add `in-before-resolve` field in `Report` data structure.
- (feat) [\#1875](https://github.com/bandprotocol/bandchain/pull/1875) Add CLI and REST query interface for request.
Expand Down
1 change: 1 addition & 0 deletions chain/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func NewDB(dialect, path string) (*BandDB, error) {
CAST(shares AS DECIMAL) / CAST(delegator_shares AS DECIMAL) * 100 as share_percentage,
CAST(shares AS DECIMAL) * CAST(current_reward AS DECIMAL) / CAST(delegator_shares AS DECIMAL) + (CAST(current_ratio AS DECIMAL) - CAST(last_ratio AS DECIMAL)) * CAST(shares AS DECIMAL) as reward,
validator_address,
moniker,
delegator_address
FROM delegations JOIN validators ON validator_address = operator_address;
`)
Expand Down