mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 02:05:53 +00:00
Fix unit tests.
This commit is contained in:
parent
a54e2e96eb
commit
75c007fab3
@ -68,7 +68,6 @@ public class BlockChainTest {
|
|||||||
chain = new BlockChain(unitTestParams, wallet, blockStore);
|
chain = new BlockChain(unitTestParams, wallet, blockStore);
|
||||||
|
|
||||||
coinbaseTo = wallet.keychain.get(0).toAddress(unitTestParams);
|
coinbaseTo = wallet.keychain.get(0).toAddress(unitTestParams);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -200,7 +199,7 @@ public class BlockChainTest {
|
|||||||
// allowable difficulty.
|
// allowable difficulty.
|
||||||
fail();
|
fail();
|
||||||
} catch (VerificationException e) {
|
} catch (VerificationException e) {
|
||||||
assertTrue(e.getMessage(), e.getMessage().indexOf("Difficulty target is bad") >= 0);
|
assertTrue(e.getMessage(), e.getCause().getMessage().indexOf("Difficulty target is bad") >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accept any level of difficulty now.
|
// Accept any level of difficulty now.
|
||||||
@ -211,7 +210,7 @@ public class BlockChainTest {
|
|||||||
// We should not get here as the difficulty target should not be changing at this point.
|
// We should not get here as the difficulty target should not be changing at this point.
|
||||||
fail();
|
fail();
|
||||||
} catch (VerificationException e) {
|
} catch (VerificationException e) {
|
||||||
assertTrue(e.getMessage(), e.getMessage().indexOf("Unexpected change in difficulty") >= 0);
|
assertTrue(e.getMessage(), e.getCause().getMessage().indexOf("Unexpected change in difficulty") >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Test difficulty change is not out of range when a transition period becomes valid.
|
// TODO: Test difficulty change is not out of range when a transition period becomes valid.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user