Skip to content

Commit 5c1adf2

Browse files
authored
Merge pull request #17488 from MinaProtocol/lyh/sig-kind-graphql-requests
Push sig kind out of integration test lib and batch txn tool
2 parents 19872b9 + 0422c75 commit 5c1adf2

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/app/batch_txn_tool/batch_txn_tool.ml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ let get_nonce ~logger ~(ingress_uri : Uri.t) ~(pub_key : Account.key) =
118118
let account_id = Account_id.create pub_key Mina_base.Token_id.default in
119119
let%bind nonce =
120120
let%bind querry_result =
121-
Integration_test_lib.Graphql_requests.get_account_data ingress_uri ~logger
122-
~account_id
121+
Graphql_requests.get_account_data ingress_uri ~logger ~account_id
123122
in
124123
match querry_result with
125124
| Ok res ->
@@ -154,7 +153,7 @@ let there_and_back_again ~num_txn_per_acct ~txns_per_block ~slot_time ~fill_rate
154153
~origin_sender_secret_key_path
155154
~(origin_sender_secret_key_pw_option : string option)
156155
~returner_secret_key_path ~(returner_secret_key_pw_option : string option)
157-
~graphql_target_node_option ~minimum_user_command_fee () =
156+
~graphql_target_node_option ~minimum_user_command_fee ~signature_kind () =
158157
let open Deferred.Let_syntax in
159158
(* define the rate limiting function *)
160159
let open Logger in
@@ -262,6 +261,7 @@ let there_and_back_again ~num_txn_per_acct ~txns_per_block ~slot_time ~fill_rate
262261
~sender_keypair:sender_kp ~receiver_pub_key ~amount:base_send_amount
263262
~fee:fee_amount ~nonce ~memo:""
264263
~valid_until:Mina_numbers.Global_slot_since_genesis.max_value
264+
~signature_kind
265265
in
266266
let%bind () =
267267
match res with
@@ -406,7 +406,8 @@ let output_there_and_back_cmds =
406406
~slot_time ~fill_rate ~rate_limit ~rate_limit_level ~rate_limit_interval
407407
~origin_sender_secret_key_path ~origin_sender_secret_key_pw_option
408408
~returner_secret_key_path ~returner_secret_key_pw_option
409-
~graphql_target_node_option ~minimum_user_command_fee )
409+
~graphql_target_node_option ~minimum_user_command_fee
410+
~signature_kind:Mina_signature_kind.t_DEPRECATED )
410411

411412
let () =
412413
Command.run

src/lib/testing/integration_test_lib/graphql_requests.ml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,7 @@ let must_send_payment_with_raw_sig ~logger node_uri ~sender_pub_key
939939

940940
let sign_and_send_payment ~logger node_uri
941941
~(sender_keypair : Import.Signature_keypair.t) ~receiver_pub_key ~amount
942-
~fee ~nonce ~memo ~valid_until =
943-
let signature_kind = Mina_signature_kind.t_DEPRECATED in
942+
~fee ~nonce ~memo ~valid_until ~signature_kind =
944943
let sender_pub_key =
945944
sender_keypair.public_key |> Signature_lib.Public_key.compress
946945
in
@@ -967,14 +966,6 @@ let sign_and_send_payment ~logger node_uri
967966
send_payment_with_raw_sig ~logger node_uri ~sender_pub_key ~receiver_pub_key
968967
~amount ~fee ~nonce ~memo ~valid_until ~raw_signature
969968

970-
let must_sign_and_send_payment ~logger node_uri
971-
~(sender_keypair : Import.Signature_keypair.t) ~receiver_pub_key ~amount
972-
~fee ~nonce ~memo ~valid_until =
973-
sign_and_send_payment ~logger node_uri
974-
~(sender_keypair : Import.Signature_keypair.t)
975-
~receiver_pub_key ~amount ~fee ~nonce ~memo ~valid_until
976-
|> Deferred.bind ~f:Malleable_error.or_hard_error
977-
978969
let send_test_payments ~(repeat_count : Unsigned.UInt32.t)
979970
~(repeat_delay_ms : Unsigned.UInt32.t) ~logger node_uri
980971
~(senders : Import.Private_key.t list) ~(receiver_pub_key : Account.key)

0 commit comments

Comments
 (0)