File tree Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -431,15 +431,16 @@ def test_conditions(
431
431
conds : SpendBundleConditions ,
432
432
expected : Optional [Err ],
433
433
) -> None :
434
- assert (
435
- check_time_locks (
436
- dict (self .REMOVALS ),
437
- conds ,
438
- self .PREV_BLOCK_HEIGHT ,
439
- self .PREV_BLOCK_TIMESTAMP ,
440
- )
441
- == expected
434
+ res = check_time_locks (
435
+ dict (self .REMOVALS ),
436
+ conds ,
437
+ self .PREV_BLOCK_HEIGHT ,
438
+ self .PREV_BLOCK_TIMESTAMP ,
442
439
)
440
+ if res is not None :
441
+ # TODO: remove when Rust errors and Python Errors are the same
442
+ res = Err (res )
443
+ assert res == expected
443
444
444
445
445
446
def expect (
Original file line number Diff line number Diff line change @@ -719,18 +719,14 @@ async def validate_spend_bundle(
719
719
# point-of-view of the next block to be farmed. Therefore we pass in the
720
720
# current peak's height and timestamp
721
721
assert self .peak .timestamp is not None
722
- try :
723
- tl_error : Optional [Err ] = check_time_locks (
724
- removal_record_dict ,
725
- conds ,
726
- self .peak .height ,
727
- self .peak .timestamp ,
728
- )
729
- except Exception as e :
730
- breakpoint ()
731
-
722
+ tl_error : Optional [Err ] = check_time_locks (
723
+ removal_record_dict ,
724
+ conds ,
725
+ self .peak .height ,
726
+ self .peak .timestamp ,
727
+ )
732
728
if tl_error is not None :
733
- breakpoint ( )
729
+ tl_error = Err ( tl_error )
734
730
735
731
timelocks : TimelockConditions = compute_assert_height (removal_record_dict , conds )
736
732
You can’t perform that action at this time.
0 commit comments