diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index a7f2054147..b87b9b9445 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -24,6 +24,7 @@ ### Emitter & Flusher +- (feat) [\#2248](https://github.com/bandprotocol/bandchain/pull/2248) Add identity column on delegation view table. - (bugs) [\#2273](https://github.com/bandprotocol/bandchain/pull/2273) Fix bug update delegators table after withdraw reward. - (bugs) [\#2255](https://github.com/bandprotocol/bandchain/pull/2255) Fix bug `reward_amount` and `commission_amount` in extra field. - (bugs) [\#2252](https://github.com/bandprotocol/bandchain/pull/2252) `handle_set_validator` get wrong validator id. diff --git a/flusher/flusher/init.py b/flusher/flusher/init.py index 96d5d2da77..36860fc81f 100644 --- a/flusher/flusher/init.py +++ b/flusher/flusher/init.py @@ -28,7 +28,8 @@ def init(chain_id, topic, db): 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, validators.operator_address, moniker, - accounts.address AS delegator_address + accounts.address AS delegator_address, + identity FROM delegations JOIN validators ON delegations.validator_id=validators.id JOIN accounts ON accounts.id=delegations.delegator_id;''') engine.execute('''CREATE VIEW validator_last_250_votes AS