WIP
This commit is contained in:
parent
525413e3f1
commit
d382596c7f
@ -2,7 +2,7 @@
|
||||
|
||||
-record(node,
|
||||
{ip = {161,97,102,143} :: string() | inet:ip_address(),
|
||||
external = 3013 :: inet:port_number(), % 3013
|
||||
external = 3013 :: none | inet:port_number(), % 3013
|
||||
internal = none :: none | inet:port_number(), % 3113
|
||||
rosetta = none :: none | inet:port_number(), % 8080
|
||||
channel = none :: none | inet:port_number(), % 3014
|
||||
|
@ -55,6 +55,7 @@ start(normal, _Args) ->
|
||||
ok = tell(error, "DANGER! This node is in distributed mode!"),
|
||||
init:stop(1)
|
||||
end,
|
||||
ok = application:ensure_started(hakuzaru),
|
||||
ok = application:ensure_started(zxwidgets),
|
||||
gmc_sup:start_link().
|
||||
|
||||
|
@ -381,7 +381,7 @@ do_show_ui(Name, State = #s{tasks = Tasks, prefs = Prefs, wallet = Wallet}) ->
|
||||
end.
|
||||
|
||||
|
||||
do_chain(ID, State = #s{prefs = Prefs}) ->
|
||||
do_chain(_, State) ->
|
||||
tell("Would be doing chain in do_chain/2 here"),
|
||||
State.
|
||||
|
||||
@ -522,8 +522,14 @@ do_add_node(New, State) ->
|
||||
State.
|
||||
|
||||
|
||||
do_set_sole_node(TheOneTrueNode, State) ->
|
||||
tell("TheOneTrueNode: ~p", [TheOneTrueNode]),
|
||||
% FIXME: This will, of course, totally explode if anything goes wrong
|
||||
do_set_sole_node(TOTN = #node{external = none}, State) ->
|
||||
do_set_sole_node(TOTN#node{external = 3013}, State);
|
||||
do_set_sole_node(#node{ip = Address, external = Port}, State) ->
|
||||
ok = hz:chain_nodes([{Address, Port}]),
|
||||
{ok, Status = #{"network_id" := NetworkID}} = hz:status(),
|
||||
ok = hz:network_id(NetworkID),
|
||||
tell("Status: ~p", [Status]),
|
||||
State.
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user