Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/aecore/lib/aecore/chain/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defmodule Aecore.Chain.Worker do
alias Aecore.Chain.ChainState
alias Aecore.Utils.Blockchain.BlockValidation
alias Aecore.Utils.Blockchain.Difficulty
alias Aecore.Txs.Pool.Worker, as: Pool

use GenServer

Expand Down Expand Up @@ -85,6 +86,7 @@ defmodule Aecore.Chain.Worker do
try do
BlockValidation.validate_block!(b, prior_block,
new_chain_state)
Enum.each(b.txs, fn(tx) -> Pool.remove_transaction(tx) end)
total_tokens = ChainState.calculate_total_tokens(new_chain_state)
Logger.info(fn ->
"Added block ##{b.header.height} with hash #{b.header
Expand Down
2 changes: 1 addition & 1 deletion apps/aecore/lib/aecore/miner/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ defmodule Aecore.Miner.Worker do
defp mine_next_block() do
chain_state = Chain.chain_state()

txs_list = Map.values(Pool.get_and_empty_pool())
txs_list = Map.values(Pool.get_pool())

blocks_for_difficulty_calculation = Chain.get_blocks_for_difficulty_calculation()
{latest_block, previous_block} = Chain.get_prior_blocks_for_validity_check()
Expand Down
3 changes: 2 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ config :aecore, :keys,

config :logger,
compile_time_purge_level: :info,
backends: [{LoggerFileBackend, :info},
backends: [:console,
{LoggerFileBackend, :info},
{LoggerFileBackend, :error}]

config :logger, :info,
Expand Down