Skip to content

Commit c9e9112

Browse files
committed
fix tests
1 parent a9f9135 commit c9e9112

File tree

6 files changed

+37
-34
lines changed

6 files changed

+37
-34
lines changed

packages/rs-drive-abci/src/execution/check_tx/v0/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ mod tests {
16991699

17001700
assert_eq!(
17011701
update_processing_result.aggregated_fees().processing_fee,
1702-
2503110
1702+
2503570
17031703
);
17041704

17051705
let check_result = platform

packages/rs-drive/src/drive/contract/insert/add_new_keywords/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Drive {
9797
&self,
9898
contract_id: Identifier,
9999
owner_id: Identifier,
100-
keywords: &Vec<String>,
100+
keywords: &[String],
101101
block_info: &BlockInfo,
102102
estimated_costs_only_with_layer_info: &mut Option<
103103
HashMap<KeyInfoPath, EstimatedLayerInformation>,

packages/rs-drive/src/drive/contract/insert/add_new_keywords/v0/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl Drive {
8989
&self,
9090
contract_id: Identifier,
9191
owner_id: Identifier,
92-
keywords: &Vec<String>,
92+
keywords: &[String],
9393
block_info: &BlockInfo,
9494
estimated_costs_only_with_layer_info: &mut Option<
9595
HashMap<KeyInfoPath, EstimatedLayerInformation>,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
mod add_contract_to_storage;
2+
#[allow(clippy::too_many_arguments)]
23
mod add_new_keywords;
34
mod insert_contract;

packages/rs-drive/tests/deterministic_root_hash.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ mod tests {
282282
load_system_data_contract(SystemDataContract::Dashpay, platform_version)
283283
.expect("should load dpns contract");
284284

285+
println!("Dashpay contract: {:?}", dashpay_contract);
286+
285287
drive
286288
.apply_contract(
287289
&dashpay_contract,
@@ -302,7 +304,7 @@ mod tests {
302304
// We expect a different app hash because data contract is not serialized the same way
303305
let expected_app_hash = match platform_version.protocol_version {
304306
0..=8 => "1b80f4a9f00597b3f1ddca904b3cee67576868adcdd802c0a3f91e14209bb402",
305-
_ => "107bcfc100e64a51e60b3e7ca7e7823b11968c2db599c212a8d09869e3ce1dd0",
307+
_ => "aa29a0d3dcdcb1dc1b446830931762e0b9c2e2d97d6f426f8dbe4e0eda8e6130",
306308
};
307309

308310
assert_eq!(

packages/rs-drive/tests/query_tests.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,8 +2509,8 @@ mod tests {
25092509
.expect("there is always a root hash");
25102510

25112511
let expected_app_hash = vec![
2512-
59, 253, 119, 177, 148, 100, 153, 121, 228, 238, 250, 185, 103, 53, 113, 8, 30, 192,
2513-
75, 150, 153, 2, 24, 109, 93, 91, 97, 75, 106, 35, 29, 252,
2512+
163, 83, 211, 88, 187, 57, 197, 189, 189, 39, 40, 150, 102, 186, 188, 111, 200, 230,
2513+
134, 21, 72, 136, 135, 92, 102, 206, 72, 43, 127, 87, 26, 82,
25142514
];
25152515

25162516
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -3823,8 +3823,8 @@ mod tests {
38233823
assert_eq!(
38243824
root_hash.as_slice(),
38253825
vec![
3826-
5, 92, 86, 251, 178, 238, 8, 246, 80, 139, 148, 81, 135, 108, 57, 197, 114, 102,
3827-
219, 71, 50, 0, 47, 252, 106, 157, 118, 30, 128, 199, 55, 126,
3826+
243, 205, 195, 230, 73, 41, 217, 87, 42, 205, 142, 71, 144, 29, 239, 97, 174, 131,
3827+
226, 122, 190, 78, 58, 99, 94, 106, 233, 185, 194, 198, 246, 205
38283828
],
38293829
);
38303830
}
@@ -3974,8 +3974,8 @@ mod tests {
39743974
.expect("there is always a root hash");
39753975

39763976
let expected_app_hash = vec![
3977-
59, 253, 119, 177, 148, 100, 153, 121, 228, 238, 250, 185, 103, 53, 113, 8, 30, 192,
3978-
75, 150, 153, 2, 24, 109, 93, 91, 97, 75, 106, 35, 29, 252,
3977+
163, 83, 211, 88, 187, 57, 197, 189, 189, 39, 40, 150, 102, 186, 188, 111, 200, 230,
3978+
134, 21, 72, 136, 135, 92, 102, 206, 72, 43, 127, 87, 26, 82,
39793979
];
39803980

39813981
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -4426,8 +4426,8 @@ mod tests {
44264426
.expect("there is always a root hash");
44274427

44284428
let expected_app_hash = vec![
4429-
40, 208, 218, 141, 51, 7, 57, 5, 17, 42, 78, 70, 239, 65, 98, 146, 20, 42, 68, 135,
4430-
241, 126, 28, 204, 213, 7, 128, 14, 31, 163, 15, 2,
4429+
138, 110, 99, 80, 216, 232, 45, 246, 159, 207, 139, 253, 210, 64, 32, 114, 102, 107,
4430+
21, 120, 163, 19, 189, 99, 109, 95, 56, 217, 134, 206, 160, 215,
44314431
];
44324432

44334433
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -4549,8 +4549,8 @@ mod tests {
45494549

45504550
// Make sure the state is deterministic
45514551
let expected_app_hash = vec![
4552-
59, 253, 119, 177, 148, 100, 153, 121, 228, 238, 250, 185, 103, 53, 113, 8, 30, 192,
4553-
75, 150, 153, 2, 24, 109, 93, 91, 97, 75, 106, 35, 29, 252,
4552+
163, 83, 211, 88, 187, 57, 197, 189, 189, 39, 40, 150, 102, 186, 188, 111, 200, 230,
4553+
134, 21, 72, 136, 135, 92, 102, 206, 72, 43, 127, 87, 26, 82,
45544554
];
45554555

45564556
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -5347,8 +5347,8 @@ mod tests {
53475347
.expect("there is always a root hash");
53485348

53495349
let expected_app_hash = vec![
5350-
89, 134, 179, 83, 10, 119, 219, 251, 215, 151, 38, 111, 63, 245, 250, 229, 201, 136,
5351-
190, 129, 75, 226, 88, 216, 93, 69, 152, 224, 156, 93, 170, 125,
5350+
252, 254, 89, 190, 119, 227, 29, 62, 78, 216, 77, 35, 178, 115, 23, 145, 237, 234, 159,
5351+
60, 9, 83, 51, 174, 88, 255, 12, 116, 106, 202, 232, 29,
53525352
];
53535353

53545354
assert_eq!(root_hash.as_slice(), expected_app_hash,);
@@ -5443,8 +5443,8 @@ mod tests {
54435443
.expect("there is always a root hash");
54445444

54455445
let expected_app_hash = vec![
5446-
89, 134, 179, 83, 10, 119, 219, 251, 215, 151, 38, 111, 63, 245, 250, 229, 201, 136,
5447-
190, 129, 75, 226, 88, 216, 93, 69, 152, 224, 156, 93, 170, 125,
5446+
252, 254, 89, 190, 119, 227, 29, 62, 78, 216, 77, 35, 178, 115, 23, 145, 237, 234, 159,
5447+
60, 9, 83, 51, 174, 88, 255, 12, 116, 106, 202, 232, 29,
54485448
];
54495449

54505450
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -5539,8 +5539,8 @@ mod tests {
55395539
.expect("there is always a root hash");
55405540

55415541
let expected_app_hash = vec![
5542-
89, 134, 179, 83, 10, 119, 219, 251, 215, 151, 38, 111, 63, 245, 250, 229, 201, 136,
5543-
190, 129, 75, 226, 88, 216, 93, 69, 152, 224, 156, 93, 170, 125,
5542+
252, 254, 89, 190, 119, 227, 29, 62, 78, 216, 77, 35, 178, 115, 23, 145, 237, 234, 159,
5543+
60, 9, 83, 51, 174, 88, 255, 12, 116, 106, 202, 232, 29,
55445544
];
55455545

55465546
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -5635,8 +5635,8 @@ mod tests {
56355635
.expect("there is always a root hash");
56365636

56375637
let expected_app_hash = vec![
5638-
89, 134, 179, 83, 10, 119, 219, 251, 215, 151, 38, 111, 63, 245, 250, 229, 201, 136,
5639-
190, 129, 75, 226, 88, 216, 93, 69, 152, 224, 156, 93, 170, 125,
5638+
252, 254, 89, 190, 119, 227, 29, 62, 78, 216, 77, 35, 178, 115, 23, 145, 237, 234, 159,
5639+
60, 9, 83, 51, 174, 88, 255, 12, 116, 106, 202, 232, 29,
56405640
];
56415641

56425642
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -5831,8 +5831,8 @@ mod tests {
58315831
.expect("there is always a root hash");
58325832

58335833
let expected_app_hash = vec![
5834-
236, 213, 202, 143, 111, 54, 250, 174, 57, 239, 156, 18, 122, 223, 88, 20, 13, 180, 89,
5835-
144, 31, 20, 138, 189, 2, 148, 160, 95, 231, 108, 216, 163,
5834+
89, 74, 31, 85, 116, 81, 139, 178, 90, 11, 123, 172, 93, 187, 25, 125, 35, 201, 210,
5835+
64, 40, 43, 40, 68, 230, 228, 168, 46, 63, 219, 98, 240,
58365836
];
58375837

58385838
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -6038,8 +6038,8 @@ mod tests {
60386038
.expect("there is always a root hash");
60396039

60406040
let expected_app_hash = vec![
6041-
236, 213, 202, 143, 111, 54, 250, 174, 57, 239, 156, 18, 122, 223, 88, 20, 13, 180, 89,
6042-
144, 31, 20, 138, 189, 2, 148, 160, 95, 231, 108, 216, 163,
6041+
89, 74, 31, 85, 116, 81, 139, 178, 90, 11, 123, 172, 93, 187, 25, 125, 35, 201, 210,
6042+
64, 40, 43, 40, 68, 230, 228, 168, 46, 63, 219, 98, 240,
60436043
];
60446044

60456045
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -6248,8 +6248,8 @@ mod tests {
62486248
.expect("there is always a root hash");
62496249

62506250
let expected_app_hash = vec![
6251-
236, 213, 202, 143, 111, 54, 250, 174, 57, 239, 156, 18, 122, 223, 88, 20, 13, 180, 89,
6252-
144, 31, 20, 138, 189, 2, 148, 160, 95, 231, 108, 216, 163,
6251+
89, 74, 31, 85, 116, 81, 139, 178, 90, 11, 123, 172, 93, 187, 25, 125, 35, 201, 210,
6252+
64, 40, 43, 40, 68, 230, 228, 168, 46, 63, 219, 98, 240,
62536253
];
62546254

62556255
assert_eq!(root_hash.as_slice(), expected_app_hash,);
@@ -6462,8 +6462,8 @@ mod tests {
64626462
.expect("there is always a root hash");
64636463

64646464
let expected_app_hash = vec![
6465-
174, 178, 50, 69, 201, 231, 248, 75, 88, 168, 83, 29, 141, 40, 117, 63, 157, 205, 24,
6466-
56, 113, 108, 224, 27, 225, 24, 134, 153, 157, 130, 80, 200,
6465+
244, 130, 169, 10, 90, 218, 48, 147, 73, 95, 89, 174, 234, 151, 228, 21, 155, 188, 165,
6466+
185, 121, 77, 221, 236, 82, 228, 82, 133, 102, 214, 251, 40,
64676467
];
64686468

64696469
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -6542,8 +6542,8 @@ mod tests {
65426542
.expect("there is always a root hash");
65436543

65446544
let expected_app_hash = vec![
6545-
174, 178, 50, 69, 201, 231, 248, 75, 88, 168, 83, 29, 141, 40, 117, 63, 157, 205, 24,
6546-
56, 113, 108, 224, 27, 225, 24, 134, 153, 157, 130, 80, 200,
6545+
244, 130, 169, 10, 90, 218, 48, 147, 73, 95, 89, 174, 234, 151, 228, 21, 155, 188, 165,
6546+
185, 121, 77, 221, 236, 82, 228, 82, 133, 102, 214, 251, 40,
65476547
];
65486548

65496549
assert_eq!(root_hash.as_slice(), expected_app_hash);
@@ -6643,8 +6643,8 @@ mod tests {
66436643
.expect("there is always a root hash");
66446644

66456645
let expected_app_hash = vec![
6646-
174, 178, 50, 69, 201, 231, 248, 75, 88, 168, 83, 29, 141, 40, 117, 63, 157, 205, 24,
6647-
56, 113, 108, 224, 27, 225, 24, 134, 153, 157, 130, 80, 200,
6646+
244, 130, 169, 10, 90, 218, 48, 147, 73, 95, 89, 174, 234, 151, 228, 21, 155, 188, 165,
6647+
185, 121, 77, 221, 236, 82, 228, 82, 133, 102, 214, 251, 40,
66486648
];
66496649

66506650
assert_eq!(root_hash.as_slice(), expected_app_hash);

0 commit comments

Comments
 (0)