Add bytes(int), add address_literalsm add ecverify_secp256k1 #550

Merged
zxq9 merged 2 commits from PT-164629541-generic_hash_and_signature into master 2019-04-23 18:23:33 +09:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 5e6af18c7b - Show all commits

View File

@ -135,7 +135,7 @@ encode_type(#tuple_t{args=As}) ->
Eas = encode_types(As),
[{<<"tuple">>,Eas}];
encode_type(#bytes_t{len=Len}) ->
list_to_binary(lists:concat(["bytes(", Len, ")"]));
{<<"bytes">>, Len};
encode_type(#record_t{fields=Fs}) ->
Efs = encode_fields(Fs),
[{<<"record">>,Efs}];

View File

@ -726,8 +726,7 @@ ttl_t(Icode) ->
ast_typerep({qid, [], ["Chain", "ttl"]}, Icode).
sign_t() -> bytes_t(64).
bytes_t(Len) when Len =< 32 -> word;
bytes_t(Len) -> {tuple, lists:duplicate((31 + Len) div 32, word)}.
bytes_t(Len) -> {bytes, Len}.
get_signature_arg(Args0) ->
NamedArgs = [Arg || Arg = {named_arg, _, _, _} <- Args0],