Key rotation: also unit test the creation time of a fresh key.

This commit is contained in:
Mike Hearn
2014-10-22 20:03:15 +02:00
parent 1a55f8d2d5
commit bb138e70c3

View File

@@ -2411,6 +2411,7 @@ public class WalletTest extends TestWithWallet {
Address output = txns.get(0).getOutput(0).getAddressFromP2PKHScript(params);
ECKey usedKey = wallet.findKeyFromPubHash(output.getHash160());
assertEquals(goodKey.getCreationTimeSeconds(), usedKey.getCreationTimeSeconds());
assertEquals(goodKey.getCreationTimeSeconds(), wallet.freshReceiveKey().getCreationTimeSeconds());
assertEquals("mrM3TpCnav5YQuVA1xLercCGJH4DXujMtv", usedKey.toAddress(params).toString());
}