@@ -503,7 +503,7 @@ impl ActorHarness {
503
503
504
504
let state = self . get_state ( rt) ;
505
505
// burn networkFee
506
- if state. fee_debt > TokenAmount :: zero ( ) || params. sectors . len ( ) > 1 {
506
+ if state. fee_debt . is_positive ( ) || params. sectors . len ( ) > 1 {
507
507
let expected_network_fee =
508
508
aggregate_pre_commit_network_fee ( params. sectors . len ( ) as i64 , base_fee) ;
509
509
let expected_burn = expected_network_fee + state. fee_debt ;
@@ -589,7 +589,7 @@ impl ActorHarness {
589
589
// in the original test the else branch does some redundant checks which we can omit.
590
590
591
591
let state = self . get_state ( rt) ;
592
- if state. fee_debt > TokenAmount :: zero ( ) {
592
+ if state. fee_debt . is_positive ( ) {
593
593
rt. expect_send (
594
594
* BURNT_FUNDS_ACTOR_ADDR ,
595
595
METHOD_SEND ,
@@ -939,7 +939,7 @@ impl ActorHarness {
939
939
}
940
940
}
941
941
942
- if expected_pledge != TokenAmount :: zero ( ) {
942
+ if !expected_pledge . is_zero ( ) {
943
943
rt. expect_send (
944
944
* STORAGE_POWER_ACTOR_ADDR ,
945
945
PowerMethod :: UpdatePledgeTotal as u64 ,
@@ -1029,7 +1029,7 @@ impl ActorHarness {
1029
1029
penalty_total += cfg. repaid_fee_debt . clone ( ) ;
1030
1030
penalty_total += cfg. expired_precommit_penalty . clone ( ) ;
1031
1031
1032
- if penalty_total != TokenAmount :: zero ( ) {
1032
+ if !penalty_total . is_zero ( ) {
1033
1033
rt. expect_send (
1034
1034
* BURNT_FUNDS_ACTOR_ADDR ,
1035
1035
METHOD_SEND ,
@@ -1053,7 +1053,7 @@ impl ActorHarness {
1053
1053
pledge_delta += cfg. expired_sectors_pledge_delta ;
1054
1054
pledge_delta -= immediately_vesting_funds ( rt, & state) ;
1055
1055
1056
- if pledge_delta != TokenAmount :: zero ( ) {
1056
+ if !pledge_delta . is_zero ( ) {
1057
1057
rt. expect_send (
1058
1058
* STORAGE_POWER_ACTOR_ADDR ,
1059
1059
PowerMethod :: UpdatePledgeTotal as u64 ,
@@ -1407,7 +1407,7 @@ impl ActorHarness {
1407
1407
ExitCode :: OK ,
1408
1408
) ;
1409
1409
1410
- if penalty > TokenAmount :: zero ( ) {
1410
+ if penalty. is_positive ( ) {
1411
1411
rt. expect_send (
1412
1412
* BURNT_FUNDS_ACTOR_ADDR ,
1413
1413
METHOD_SEND ,
@@ -1587,7 +1587,7 @@ impl ActorHarness {
1587
1587
rt. set_caller ( * ACCOUNT_ACTOR_CODE_ID , self . worker ) ;
1588
1588
rt. expect_validate_caller_addr ( self . caller_addrs ( ) ) ;
1589
1589
1590
- if expected_debt_repaid > TokenAmount :: zero ( ) {
1590
+ if expected_debt_repaid. is_positive ( ) {
1591
1591
rt. expect_send (
1592
1592
* BURNT_FUNDS_ACTOR_ADDR ,
1593
1593
METHOD_SEND ,
@@ -1924,7 +1924,7 @@ impl ActorHarness {
1924
1924
}
1925
1925
1926
1926
let total_repaid = expected_repaid_from_vest + expected_repaid_from_balance;
1927
- if total_repaid > TokenAmount :: zero ( ) {
1927
+ if total_repaid. is_positive ( ) {
1928
1928
rt. expect_send (
1929
1929
* BURNT_FUNDS_ACTOR_ADDR ,
1930
1930
METHOD_SEND ,
0 commit comments