Skip to content

Commit

Permalink
Fix tests for TxValidityUpperBound
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Oct 27, 2023
1 parent e4ab085 commit 01e98c0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
10 changes: 0 additions & 10 deletions cardano-cli/src/Cardano/CLI/Json/Friendly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,11 @@ friendlyExtraKeyWits = \case
TxExtraKeyWitnessesNone -> Null
TxExtraKeyWitnesses _supported paymentKeyHashes -> toJSON paymentKeyHashes

-- | Special case of validity range:
-- in Shelley, upper bound is TTL, and no lower bound
pattern ShelleyTtl
:: Maybe SlotNo -> (TxValidityLowerBound era, TxValidityUpperBound era)
pattern ShelleyTtl ttl <-
( TxValidityNoLowerBound
, TxValidityUpperBound _ ttl
)

friendlyValidityRange
:: CardanoEra era
-> (TxValidityLowerBound era, TxValidityUpperBound era)
-> Aeson.Value
friendlyValidityRange era = \case
ShelleyTtl ttl -> object ["time to live" .= ttl]
(lowerBound, upperBound)
| isLowerBoundSupported || isUpperBoundSupported ->
object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ return collateral: null
total collateral: null
update proposal: null
validity range:
time to live: 101
lower bound: null
upper bound: 101
withdrawals: null
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ return collateral: null
total collateral: null
update proposal: null
validity range:
time to live: null
lower bound: null
upper bound: null
withdrawals: null
witnesses:
- key: VKey (VerKeyEd25519DSIGN "84ce03e08b05533685d593c14cd6ca5c7485824156ca11fb303ddac9dd3ef41c")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ update proposal:
steps: 197
max value size: 199
validity range:
time to live: null
lower bound: null
upper bound: null
withdrawals: null
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ update proposal:
transaction fee linear per byte: 76
treasury expansion: 87/88
validity range:
time to live: 33
lower bound: null
upper bound: 33
withdrawals:
- address: stake_test1up00fz9lyqs5sjks82k22eqz7a9srym9vysjgp3h2ua2v2cm522kg
amount: 42 Lovelace
Expand Down

0 comments on commit 01e98c0

Please sign in to comment.