Skip to content

Commit fc24732

Browse files
ZenGround0arajasek
authored andcommitted
Call exported authenticate method from PSD (#829)
Co-authored-by: zenground0 <[email protected]>
1 parent 3b06a5d commit fc24732

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

actors/account/tests/account_actor_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn authenticate_message() {
103103
});
104104
assert_eq!(
105105
RawBytes::default(),
106-
rt.call::<AccountActor>(Method::AuthenticateMessage as MethodNum, &params).unwrap()
106+
rt.call::<AccountActor>(Method::AuthenticateMessageExported as MethodNum, &params).unwrap()
107107
);
108108
rt.verify();
109109

@@ -118,7 +118,7 @@ fn authenticate_message() {
118118
expect_abort_contains_message(
119119
ExitCode::USR_ILLEGAL_ARGUMENT,
120120
"bad signature",
121-
rt.call::<AccountActor>(Method::AuthenticateMessage as MethodNum, &params),
121+
rt.call::<AccountActor>(Method::AuthenticateMessageExported as MethodNum, &params),
122122
);
123123
rt.verify();
124124

actors/market/src/ext.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use fvm_shared::smooth::FilterEstimate;
1010
pub mod account {
1111
use super::*;
1212

13-
pub const AUTHENTICATE_MESSAGE_METHOD: u64 = 3;
13+
pub const AUTHENTICATE_MESSAGE_METHOD: u64 =
14+
frc42_dispatch::method_hash!("AuthenticateMessage");
1415

1516
#[derive(Serialize_tuple, Deserialize_tuple)]
1617
pub struct AuthenticateMessageParams {

test_vm/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ pub fn market_publish_deal(
11301130
},
11311131
ExpectInvocation {
11321132
to: deal_client,
1133-
method: AccountMethod::AuthenticateMessage as u64,
1133+
method: AccountMethod::AuthenticateMessageExported as u64,
11341134
..Default::default()
11351135
},
11361136
];

test_vm/tests/account_authenticate_message_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use fil_actor_account::types::AuthenticateMessageParams;
2-
use fil_actor_account::Method::AuthenticateMessage;
2+
use fil_actor_account::Method::AuthenticateMessageExported;
33
use fvm_ipld_blockstore::MemoryBlockstore;
44
use fvm_ipld_encoding::RawBytes;
55
use fvm_shared::bigint::Zero;
@@ -32,7 +32,7 @@ fn account_authenticate_message() {
3232
addr,
3333
addr,
3434
TokenAmount::zero(),
35-
AuthenticateMessage as u64,
35+
AuthenticateMessageExported as u64,
3636
authenticate_message_params,
3737
);
3838

@@ -44,7 +44,7 @@ fn account_authenticate_message() {
4444
addr,
4545
addr,
4646
TokenAmount::zero(),
47-
AuthenticateMessage as u64,
47+
AuthenticateMessageExported as u64,
4848
authenticate_message_params,
4949
ExitCode::USR_ILLEGAL_ARGUMENT,
5050
);

test_vm/tests/publish_deals_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ fn psd_bad_sig() {
553553
},
554554
ExpectInvocation {
555555
to: a.client1,
556-
method: AccountMethod::AuthenticateMessage as u64,
556+
method: AccountMethod::AuthenticateMessageExported as u64,
557557
params: Some(
558558
serialize(
559559
&AuthenticateMessageParams {

0 commit comments

Comments
 (0)