Skip to content

Commit 724af70

Browse files
OttoAllmendingerllm-git
andcommitted
feat(utxo-lib): add getReplayProtectionPublicKey method to AcidTest
Add a getter for the specific public key used for replay protection. This refactors the existing code to use this new method. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 4bbd231 commit 724af70

File tree

1 file changed

+5
-1
lines changed
  • modules/utxo-lib/src/testutil

1 file changed

+5
-1
lines changed

modules/utxo-lib/src/testutil/psbt.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,12 @@ export class AcidTest {
340340
return `${networkName} ${this.signStage} ${this.txFormat}`;
341341
}
342342

343+
getReplayProtectionPublicKey(): Buffer {
344+
return this.rootWalletKeys.user.publicKey;
345+
}
346+
343347
getReplayProtectionOutputScript(): Buffer {
344-
const { scriptPubKey } = createOutputScriptP2shP2pk(this.rootWalletKeys.user.publicKey);
348+
const { scriptPubKey } = createOutputScriptP2shP2pk(this.getReplayProtectionPublicKey());
345349
assert(scriptPubKey);
346350
return scriptPubKey;
347351
}

0 commit comments

Comments
 (0)