pull/2505/head
Ayrat Badykov 5 years ago
parent 7b174fad2e
commit e51efc5e06
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 21
      apps/explorer/lib/explorer/chain_spec/poa/importer.ex

@ -35,17 +35,16 @@ defmodule Explorer.ChainSpec.POA.Importer do
block_reward = block_reward_amount()
emission_funds = emission_funds_amount()
rewards =
[
%{
block_range: %Range{from: 0, to: @emission_funds_block_start},
reward: %Wei{value: block_reward}
},
%{
block_range: %Range{from: @emission_funds_block_start + 1, to: :infinity},
reward: %Wei{value: Decimal.add(block_reward, emission_funds)}
}
]
rewards = [
%{
block_range: %Range{from: 0, to: @emission_funds_block_start},
reward: %Wei{value: block_reward}
},
%{
block_range: %Range{from: @emission_funds_block_start + 1, to: :infinity},
reward: %Wei{value: Decimal.add(block_reward, emission_funds)}
}
]
{_, nil} = Repo.delete_all(EmissionReward)
{_, nil} = Repo.insert_all(EmissionReward, rewards)

Loading…
Cancel
Save