mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 01:26:45 +00:00
ensure dummy y value of taproot internal key is consistent
This commit is contained in:
parent
a3ec868b75
commit
7535c876ba
2 changed files with 4 additions and 4 deletions
|
@ -82,11 +82,11 @@ public class PSBTInput {
|
|||
|
||||
this.proprietary.putAll(proprietary);
|
||||
|
||||
this.tapInternalKey = tapInternalKey;
|
||||
this.tapInternalKey = tapInternalKey == null ? null : ECKey.fromPublicOnly(tapInternalKey.getPubKeyXCoord());
|
||||
|
||||
if(tapInternalKey != null && !derivedPublicKeys.values().isEmpty()) {
|
||||
KeyDerivation tapKeyDerivation = derivedPublicKeys.values().iterator().next();
|
||||
tapDerivedPublicKeys.put(tapInternalKey, Map.of(tapKeyDerivation, Collections.emptyList()));
|
||||
tapDerivedPublicKeys.put(this.tapInternalKey, Map.of(tapKeyDerivation, Collections.emptyList()));
|
||||
}
|
||||
|
||||
this.sigHash = getDefaultSigHash();
|
||||
|
|
|
@ -45,11 +45,11 @@ public class PSBTOutput {
|
|||
|
||||
this.proprietary.putAll(proprietary);
|
||||
|
||||
this.tapInternalKey = tapInternalKey;
|
||||
this.tapInternalKey = tapInternalKey == null ? null : ECKey.fromPublicOnly(tapInternalKey.getPubKeyXCoord());
|
||||
|
||||
if(tapInternalKey != null && !derivedPublicKeys.values().isEmpty()) {
|
||||
KeyDerivation tapKeyDerivation = derivedPublicKeys.values().iterator().next();
|
||||
tapDerivedPublicKeys.put(tapInternalKey, Map.of(tapKeyDerivation, Collections.emptyList()));
|
||||
tapDerivedPublicKeys.put(this.tapInternalKey, Map.of(tapKeyDerivation, Collections.emptyList()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue