Add getters/setters and a solve method to the Block object. Use this in a new proof of work unit test.

Introduce a unit test NetworkParameters that has very easy difficulty.
Correct some assertTrue(false) type checks to use fail() instead.
Make ALLOWED_TIME_DRIFT non-public until I have a good explanation in the javadocs of what it's for.
Simplify Block.equals
This commit is contained in:
Mike Hearn
2011-03-08 15:23:06 +00:00
parent 38bf9a8a80
commit 4003eee3fe
11 changed files with 533 additions and 124 deletions

View File

@@ -95,24 +95,6 @@ com.google.*</FONT></TH>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="3">com.google.bitcoin.core.<A HREF="com/google/bitcoin/core/Block.html" title="class in com.google.bitcoin.core">Block</A></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<A NAME="com.google.bitcoin.core.Block.ALLOWED_TIME_DRIFT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
<CODE>public&nbsp;static&nbsp;final&nbsp;long</CODE></FONT></TD>
<TD ALIGN="left"><CODE><A HREF="com/google/bitcoin/core/Block.html#ALLOWED_TIME_DRIFT">ALLOWED_TIME_DRIFT</A></CODE></TD>
<TD ALIGN="right"><CODE>7200L</CODE></TD>
</TR>
</FONT></TD>
</TR>
</TABLE>
<P>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="3">com.google.bitcoin.core.<A HREF="com/google/bitcoin/core/Message.html" title="class in com.google.bitcoin.core">Message</A></TH>