Skip to content

Commit 24e31ee

Browse files
committed
Rename wvkSig to wvkSignature
1 parent 64f8040 commit 24e31ee

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

libs/cardano-ledger-core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 1.18.0.0
44

5+
* Rename `wvkSig` to `wvkSignature`
56
* Remove `eqBootstrapWitnessRaw` and `BootstrapWitnessRaw`
67
* Rename `bwSig` to `bwSignature` for `BootstrapWitness`
78
* Remove `witVKeyBytes` and `eqWitVKeyRaw`

libs/cardano-ledger-core/src/Cardano/Ledger/Keys/WitVKey.hs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
module Cardano.Ledger.Keys.WitVKey (
1212
WitVKey (WitVKey),
1313
witVKeyHash,
14+
wvkSig,
1415
)
1516
where
1617

@@ -43,13 +44,17 @@ import NoThunks.Class (AllowThunksIn (..), NoThunks (..))
4344
-- | Proof/Witness that a transaction is authorized by the given key holder.
4445
data WitVKey kr = WitVKeyInternal
4546
{ wvkKey :: !(VKey kr)
46-
, wvkSig :: !(SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody))
47+
, wvkSignature :: !(SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody))
4748
, wvkKeyHash :: KeyHash 'Witness
4849
-- ^ Hash of the witness vkey. We store this here to avoid repeated hashing
4950
-- when used in ordering.
5051
}
5152
deriving (Generic, Show, Eq)
5253

54+
wvkSig :: WitVKey kr -> SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody)
55+
wvkSig = wvkSignature
56+
{-# DEPRECATED wvkSig "In favor of `wvkSignature`" #-}
57+
5358
deriving via
5459
AllowThunksIn '["wvkKeyHash"] (WitVKey kr)
5560
instance
@@ -68,13 +73,13 @@ instance Typeable kr => Ord (WitVKey kr) where
6873
-- have two WitVKeys in a same Set for different transactions. Therefore
6974
-- comparison on signatures is unlikely to happen and is only needed for
7075
-- compliance with Ord laws.
71-
comparing wvkKeyHash x y <> comparing (hashTxBodySignature . wvkSig) x y
76+
comparing wvkKeyHash x y <> comparing (hashTxBodySignature . wvkSignature) x y
7277

7378
instance Typeable kr => Plain.ToCBOR (WitVKey kr) where
74-
toCBOR WitVKeyInternal {wvkKey, wvkSig} =
79+
toCBOR WitVKeyInternal {wvkKey, wvkSignature} =
7580
Plain.encodeListLen 2
7681
<> Plain.toCBOR wvkKey
77-
<> encodeSignedDSIGN wvkSig
82+
<> encodeSignedDSIGN wvkSignature
7883

7984
instance Typeable kr => Plain.FromCBOR (WitVKey kr) where
8085
fromCBOR =

0 commit comments

Comments
 (0)