From 0b2670555ebd1001bdfaa575d8d440a0975c34e4 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Fri, 3 May 2019 20:53:07 +0200 Subject: [PATCH] ChildKeyDerivationTest: Fix second testcase of testChildKeyDerivation() is never tested. --- .../test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java index 455dd6df..db7b3449 100644 --- a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java @@ -53,8 +53,9 @@ public class ChildKeyDerivationTest { "cc9c753a63b8678ce647b7457397acef", "7012bc411228495f25d666d55fdce3f10a93908b5f9b9b7baa6e7573603a7bda" }; + assertEquals(0, ckdTestVectors.length % 3); - for(int i = 0; i < 1; i++) { + for(int i = 0; i < ckdTestVectors.length / 3; i++) { byte[] priv = HEX.decode(ckdTestVectors[3 * i]); byte[] pub = HEX.decode(ckdTestVectors[3 * i + 1]); byte[] chain = HEX.decode(ckdTestVectors[3 * i + 2]); // chain code