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