Skip to content

Commit 3fe6ed4

Browse files
committed
prevent negative validity start
1 parent 57d4c0d commit 3fe6ed4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pycardano/txbuilder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ def build(
894894
# Automatically set the validity range to a tight value around transaction creation
895895
last_slot = self.context.last_block_slot
896896
if self.validity_start is None:
897-
self.validity_start = last_slot - 1000
897+
self.validity_start = max(0, last_slot - 1000)
898898
if self.ttl is None:
899899
self.ttl = last_slot + 10000
900900

0 commit comments

Comments
 (0)