WalletTest: Extract empty sig constant.
@@ -3087,6 +3087,8 @@ public class WalletTest extends TestWithWallet {
assertEquals(200, tx.getInputs().size());
}
+ private static final byte[] EMPTY_SIG = {};
+
@Test
public void completeTxPartiallySignedWithDummySigs() throws Exception {
byte[] dummySig = TransactionSignature.dummy().encodeToBitcoin();
@@ -3095,8 +3097,7 @@ public class WalletTest extends TestWithWallet {
@Test
public void completeTxPartiallySignedWithEmptySig() throws Exception {
- byte[] emptySig = {};
- completeTxPartiallySigned(Wallet.MissingSigsMode.USE_OP_ZERO, emptySig);
+ completeTxPartiallySigned(Wallet.MissingSigsMode.USE_OP_ZERO, EMPTY_SIG);
}
@Test (expected = ECKey.MissingPrivateKeyException.class)
@@ -3119,14 +3120,12 @@ public class WalletTest extends TestWithWallet {
@Test
public void completeTxPartiallySignedMarriedWithEmptySig() throws Exception {
- byte[] emptySig = {};
- completeTxPartiallySignedMarried(Wallet.MissingSigsMode.USE_OP_ZERO, emptySig);
+ completeTxPartiallySignedMarried(Wallet.MissingSigsMode.USE_OP_ZERO, EMPTY_SIG);
}
@Test (expected = TransactionSigner.MissingSignatureException.class)
public void completeTxPartiallySignedMarriedThrows() throws Exception {
- byte[] emptySig = {};
- completeTxPartiallySignedMarried(Wallet.MissingSigsMode.THROW, emptySig);
+ completeTxPartiallySignedMarried(Wallet.MissingSigsMode.THROW, EMPTY_SIG);
}
@Test (expected = TransactionSigner.MissingSignatureException.class)
