File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
apps/aecore/lib/aecore/chain Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,18 @@ defmodule Aecore.Chain.Worker do
13
13
use GenServer
14
14
15
15
def start_link do
16
+ GenServer . start_link ( __MODULE__ , { } , name: __MODULE__ )
17
+ end
18
+
19
+ def init ( _ ) do
16
20
genesis_block_hash = BlockValidation . block_header_hash ( Block . genesis_block ( ) . header )
17
21
18
22
genesis_block_map = % { genesis_block_hash => Block . genesis_block ( ) }
19
23
genesis_chain_state = ChainState . calculate_block_state ( Block . genesis_block ( ) . txs )
20
24
latest_block_chain_state = % { genesis_block_hash => genesis_chain_state }
21
25
22
26
initial_state = { genesis_block_map , latest_block_chain_state }
23
- GenServer . start_link ( __MODULE__ , initial_state , name: __MODULE__ )
24
- end
25
27
26
- def init ( initial_state ) do
27
28
{ :ok , initial_state }
28
29
end
29
30
You can’t perform that action at this time.
0 commit comments