Skip to content

Commit d199cd0

Browse files
authored
Merge branch 'master' into evgenii/assets_random_improve
2 parents 7d3f2a6 + c4ea370 commit d199cd0

File tree

3 files changed

+4
-137
lines changed

3 files changed

+4
-137
lines changed

rust/src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,6 @@ impl DataCost {
258258
}
259259
}
260260
}
261-
262-
// <TODO:REMOVE_AFTER_BABBAGE>
263-
pub(crate) fn coins_per_word(&self) -> Result<Coin, JsError> {
264-
match &self.0 {
265-
DataCostEnum::CoinsPerByte(coins_per_byte) => {
266-
coins_per_byte
267-
.checked_mul(&BigNum::from_str("8")?)
268-
},
269-
DataCostEnum::CoinsPerWord(coins_per_word) => Ok(coins_per_word.clone()),
270-
}
271-
}
272261
}
273262

274263
#[wasm_bindgen]

rust/src/tx_builder.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,6 @@ mod tests {
20022002
create_tx_builder_with_fee(&create_default_linear_fee())
20032003
}
20042004

2005-
#[ignore]
20062005
#[test]
20072006
fn build_tx_with_change() {
20082007
let mut tx_builder = create_default_tx_builder();
@@ -2229,7 +2228,6 @@ mod tests {
22292228
let _final_tx = tx_builder.build(); // just test that it doesn't throw
22302229
}
22312230

2232-
#[ignore]
22332231
#[test]
22342232
fn build_tx_exact_amount() {
22352233
// transactions where sum(input) == sum(output) exact should pass
@@ -2294,7 +2292,6 @@ mod tests {
22942292
assert_eq!(final_tx.outputs().len(), 1);
22952293
}
22962294

2297-
#[ignore]
22982295
#[test]
22992296
fn build_tx_exact_change() {
23002297
// transactions where we have exactly enough ADA to add change should pass
@@ -2758,7 +2755,6 @@ mod tests {
27582755
assert_eq!(deser_t.to_json().unwrap(), final_tx.to_json().unwrap());
27592756
}
27602757

2761-
#[ignore]
27622758
#[test]
27632759
fn build_tx_with_mint_all_sent() {
27642760
let mut tx_builder = create_tx_builder_with_fee(&create_linear_fee(0, 1));
@@ -2847,7 +2843,6 @@ mod tests {
28472843
assert!(change.multiasset().is_none());
28482844
}
28492845

2850-
#[ignore]
28512846
#[test]
28522847
fn build_tx_with_mint_in_change() {
28532848
let mut tx_builder = create_tx_builder_with_fee(&create_linear_fee(0, 1));
@@ -3135,7 +3130,6 @@ mod tests {
31353130
assert!(added_change.is_err());
31363131
}
31373132

3138-
#[ignore]
31393133
#[test]
31403134
fn build_tx_with_native_assets_change() {
31413135
let mut tx_builder = create_tx_builder_with_fee(&create_linear_fee(0, 1));
@@ -3249,7 +3243,6 @@ mod tests {
32493243
assert_eq!(final_tx.outputs().get(1).amount().coin(), to_bignum(599));
32503244
}
32513245

3252-
#[ignore]
32533246
#[test]
32543247
fn build_tx_with_native_assets_change_and_purification() {
32553248
let coin_per_utxo_word = to_bignum(8);
@@ -3378,7 +3371,6 @@ mod tests {
33783371
assert_eq!(final_tx.outputs().get(2).amount().multiasset(), None);
33793372
}
33803373

3381-
#[ignore]
33823374
#[test]
33833375
fn build_tx_with_native_assets_change_and_no_purification_cuz_not_enough_pure_coin() {
33843376
// Prefer pure change!
@@ -3795,7 +3787,6 @@ mod tests {
37953787
return (multiasset, policy_ids, names);
37963788
}
37973789

3798-
#[ignore]
37993790
#[test]
38003791
fn build_tx_add_change_split_nfts() {
38013792
let max_value_size = 100; // super low max output size to test with fewer assets
@@ -3902,7 +3893,6 @@ mod tests {
39023893
.is_err());
39033894
}
39043895

3905-
#[ignore]
39063896
#[test]
39073897
fn build_tx_add_change_nfts_not_enough_ada() {
39083898
let mut tx_builder = create_tx_builder_with_fee_and_val_size(
@@ -4083,7 +4073,6 @@ mod tests {
40834073
assert_eq!(3u8, tx.inputs().get(1).transaction_id().0[0]);
40844074
}
40854075

4086-
#[ignore]
40874076
#[test]
40884077
fn tx_builder_cip2_largest_first_multiasset() {
40894078
// we have a = 0 so we know adding inputs/outputs doesn't change the fee so we can analyze more
@@ -4203,7 +4192,6 @@ mod tests {
42034192
assert_eq!(expected_change, change);
42044193
}
42054194

4206-
#[ignore]
42074195
#[test]
42084196
fn tx_builder_cip2_random_improve_multiasset() {
42094197
let mut tx_builder = create_tx_builder_with_fee(&create_linear_fee(0, 0));
@@ -4412,7 +4400,6 @@ mod tests {
44124400
assert!(add_inputs_res.is_ok(), "{:?}", add_inputs_res.err());
44134401
}
44144402

4415-
#[ignore]
44164403
#[test]
44174404
fn tx_builder_cip2_random_improve_adds_enough_for_fees() {
44184405
// we have a = 1 to test increasing fees when more inputs are added
@@ -4737,7 +4724,6 @@ mod tests {
47374724
);
47384725
}
47394726

4740-
#[ignore]
47414727
#[test]
47424728
fn add_change_splits_change_into_multiple_outputs_when_nfts_overflow_output_size() {
47434729
let linear_fee = LinearFee::new(&to_bignum(0), &to_bignum(1));
@@ -5162,7 +5148,6 @@ mod tests {
51625148
assert_eq!(mint_scripts.get(1), mint_script2);
51635149
}
51645150

5165-
#[ignore]
51665151
#[test]
51675152
fn add_output_amount() {
51685153
let mut tx_builder = create_default_tx_builder();
@@ -5192,7 +5177,6 @@ mod tests {
51925177
assert_eq!(out.amount, value);
51935178
}
51945179

5195-
#[ignore]
51965180
#[test]
51975181
fn add_output_coin() {
51985182
let mut tx_builder = create_default_tx_builder();
@@ -5219,7 +5203,6 @@ mod tests {
52195203
assert!(out.amount.multiasset.is_none());
52205204
}
52215205

5222-
#[ignore]
52235206
#[test]
52245207
fn add_output_coin_and_multiasset() {
52255208
let mut tx_builder = create_default_tx_builder();
@@ -5250,7 +5233,6 @@ mod tests {
52505233
assert_eq!(out.amount.multiasset.unwrap(), multiasset);
52515234
}
52525235

5253-
#[ignore]
52545236
#[test]
52555237
fn add_output_asset_and_min_required_coin() {
52565238
let mut tx_builder = create_reallistic_tx_builder();
@@ -5284,7 +5266,6 @@ mod tests {
52845266
assert_eq!(out.amount.coin, to_bignum(1146460));
52855267
}
52865268

5287-
#[ignore]
52885269
#[test]
52895270
fn add_mint_asset_and_output() {
52905271
let mut tx_builder = create_default_tx_builder();
@@ -5348,7 +5329,6 @@ mod tests {
53485329
assert_eq!(asset.get(&name).unwrap(), to_bignum(1234));
53495330
}
53505331

5351-
#[ignore]
53525332
#[test]
53535333
fn add_mint_asset_and_min_required_coin() {
53545334
let mut tx_builder = create_reallistic_tx_builder();
@@ -5555,7 +5535,6 @@ mod tests {
55555535
// assert!(est5.err().unwrap().to_string().contains("witness scripts are not provided"));
55565536
}
55575537

5558-
#[ignore]
55595538
#[test]
55605539
fn total_input_output_with_mint_and_burn() {
55615540
let mut tx_builder = create_tx_builder_with_fee(&create_linear_fee(0, 1));
@@ -6674,7 +6653,6 @@ mod tests {
66746653
);
66756654
}
66766655

6677-
#[ignore]
66786656
#[test]
66796657
fn test_auto_calc_total_collateral() {
66806658
let mut tx_builder = create_reallistic_tx_builder();
@@ -6710,7 +6688,6 @@ mod tests {
67106688
);
67116689
}
67126690

6713-
#[ignore]
67146691
#[test]
67156692
fn test_auto_calc_total_collateral_with_assets() {
67166693
let mut tx_builder = create_reallistic_tx_builder();

0 commit comments

Comments
 (0)