Fix remaining tests after default fee change
This commit is contained in:
parent
1285ab0af2
commit
936b399599
|
@ -505,7 +505,7 @@ mod tests {
|
|||
Ok(_) => panic!("Should have failed"),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Insufficient balance (have 0, need 10001 including fee)"
|
||||
"Insufficient balance (have 0, need 1001 including fee)"
|
||||
),
|
||||
}
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ mod tests {
|
|||
Ok(_) => panic!("Should have failed"),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Insufficient balance (have 50000, need 80000 including fee)"
|
||||
"Insufficient balance (have 50000, need 71000 including fee)"
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -603,7 +603,7 @@ mod tests {
|
|||
Ok(_) => panic!("Should have failed"),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Insufficient balance (have 50000, need 80000 including fee)"
|
||||
"Insufficient balance (have 50000, need 71000 including fee)"
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -690,7 +690,7 @@ mod tests {
|
|||
Ok(_) => panic!("Should have failed"),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Insufficient balance (have 0, need 12000 including fee)"
|
||||
"Insufficient balance (have 0, need 3000 including fee)"
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ mod tests {
|
|||
Ok(_) => panic!("Should have failed"),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Insufficient balance (have 0, need 12000 including fee)"
|
||||
"Insufficient balance (have 0, need 3000 including fee)"
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,10 @@ mod tests {
|
|||
sapling::Node,
|
||||
transaction::{
|
||||
builder::Builder,
|
||||
components::{Amount, OutPoint, TzeIn, TzeOut},
|
||||
components::{
|
||||
amount::{Amount, DEFAULT_FEE},
|
||||
OutPoint, TzeIn, TzeOut,
|
||||
},
|
||||
Transaction, TransactionData,
|
||||
},
|
||||
zip32::ExtendedSpendingKey,
|
||||
|
@ -739,7 +742,7 @@ mod tests {
|
|||
extension_id: 0,
|
||||
};
|
||||
let prevout_a = (OutPoint::new(tx_a.txid().0, 0), tx_a.tze_outputs[0].clone());
|
||||
let value_xfr = Amount::from_u64(90000).unwrap();
|
||||
let value_xfr = value - DEFAULT_FEE;
|
||||
db_b.demo_transfer_to_close(prevout_a, value_xfr, preimage_1, h2)
|
||||
.map_err(|e| format!("transfer failure: {:?}", e))
|
||||
.unwrap();
|
||||
|
@ -765,7 +768,7 @@ mod tests {
|
|||
builder_c
|
||||
.add_transparent_output(
|
||||
&TransparentAddress::PublicKey([0; 20]),
|
||||
Amount::from_u64(80000).unwrap(),
|
||||
value_xfr - DEFAULT_FEE,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
|
Loading…
Reference in New Issue