Use overloading in spec of ercoin_account:put/2

parent 86fe36bb
Pipeline #36205979 passed with stages
in 20 minutes and 4 seconds
......@@ -80,7 +80,8 @@ get(Address, Accounts) ->
ercoin_account:deserialize({Address, AccountBin})
end.
-spec put(account(), data() | accounts()) -> data() | accounts().
-spec put(account(), data()) -> data();
(account(), accounts()) -> accounts().
put(Account, Data=#data{accounts=Accounts}) ->
NewAccounts = ?MODULE:put(Account, Accounts),
Data#data{accounts=NewAccounts};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment