File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ func (a Address) PaymentAddress() *Address {
195
195
196
196
// PaymentKeyHash returns a new Blake2b224 hash of the payment key
197
197
func (a * Address ) PaymentKeyHash () Blake2b224 {
198
+ if len (a .paymentAddress ) != AddressHashSize {
199
+ // Return empty hash
200
+ return Blake2b224 ([AddressHashSize ]byte {})
201
+ }
198
202
return Blake2b224 (a .paymentAddress [:])
199
203
}
200
204
@@ -221,6 +225,10 @@ func (a Address) StakeAddress() *Address {
221
225
222
226
// StakeKeyHash returns a new Blake2b224 hash of the stake key
223
227
func (a * Address ) StakeKeyHash () Blake2b224 {
228
+ if len (a .stakingAddress ) != AddressHashSize {
229
+ // Return empty hash
230
+ return Blake2b224 ([AddressHashSize ]byte {})
231
+ }
224
232
return Blake2b224 (a .stakingAddress [:])
225
233
}
226
234
You can’t perform that action at this time.
0 commit comments