Take some Block setters out of the public API. The ability to create/solve blocks is intended only for unit testing in this library.

This commit is contained in:
Mike Hearn
2011-03-25 21:19:52 +00:00
parent bb017a5dab
commit af371677fd
4 changed files with 21 additions and 216 deletions

View File

@@ -161,14 +161,6 @@ A block is the foundation of the BitCoin system. It records a set of <A HREF="..
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#addTransaction(com.google.bitcoin.core.Transaction)">addTransaction</A></B>(<A HREF="../../../../com/google/bitcoin/core/Transaction.html" title="class in com.google.bitcoin.core">Transaction</A>&nbsp;t)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a transaction to this block.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/google/bitcoin/core/Block.html" title="class in com.google.bitcoin.core">Block</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#cloneAsHeader()">cloneAsHeader</A></B>()</CODE>
@@ -270,54 +262,6 @@ A block is the foundation of the BitCoin system. It records a set of <A HREF="..
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setDifficultyTarget(long)">setDifficultyTarget</A></B>(long&nbsp;compactForm)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setMerkleRoot(byte[])">setMerkleRoot</A></B>(byte[]&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setNonce(long)">setNonce</A></B>(long&nbsp;nonce)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setPrevBlockHash(byte[])">setPrevBlockHash</A></B>(byte[]&nbsp;prevBlockHash)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setTime(long)">setTime</A></B>(long&nbsp;time)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/bitcoin/core/Block.html#setVersion(long)">setVersion</A></B>(long&nbsp;version)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
@@ -550,30 +494,6 @@ public byte[] <B>getMerkleRoot</B>()</PRE>
</DL>
<HR>
<A NAME="setMerkleRoot(byte[])"><!-- --></A><H3>
setMerkleRoot</H3>
<PRE>
public void <B>setMerkleRoot</B>(byte[]&nbsp;value)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addTransaction(com.google.bitcoin.core.Transaction)"><!-- --></A><H3>
addTransaction</H3>
<PRE>
public void <B>addTransaction</B>(<A HREF="../../../../com/google/bitcoin/core/Transaction.html" title="class in com.google.bitcoin.core">Transaction</A>&nbsp;t)</PRE>
<DL>
<DD>Adds a transaction to this block.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getVersion()"><!-- --></A><H3>
getVersion</H3>
<PRE>
@@ -587,17 +507,6 @@ public long <B>getVersion</B>()</PRE>
</DL>
<HR>
<A NAME="setVersion(long)"><!-- --></A><H3>
setVersion</H3>
<PRE>
public void <B>setVersion</B>(long&nbsp;version)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getPrevBlockHash()"><!-- --></A><H3>
getPrevBlockHash</H3>
<PRE>
@@ -611,17 +520,6 @@ public byte[] <B>getPrevBlockHash</B>()</PRE>
</DL>
<HR>
<A NAME="setPrevBlockHash(byte[])"><!-- --></A><H3>
setPrevBlockHash</H3>
<PRE>
public void <B>setPrevBlockHash</B>(byte[]&nbsp;prevBlockHash)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTime()"><!-- --></A><H3>
getTime</H3>
<PRE>
@@ -635,17 +533,6 @@ public long <B>getTime</B>()</PRE>
</DL>
<HR>
<A NAME="setTime(long)"><!-- --></A><H3>
setTime</H3>
<PRE>
public void <B>setTime</B>(long&nbsp;time)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDifficultyTarget()"><!-- --></A><H3>
getDifficultyTarget</H3>
<PRE>
@@ -661,17 +548,6 @@ public long <B>getDifficultyTarget</B>()</PRE>
</DL>
<HR>
<A NAME="setDifficultyTarget(long)"><!-- --></A><H3>
setDifficultyTarget</H3>
<PRE>
public void <B>setDifficultyTarget</B>(long&nbsp;compactForm)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNonce()"><!-- --></A><H3>
getNonce</H3>
<PRE>
@@ -684,17 +560,6 @@ public long <B>getNonce</B>()</PRE>
</DL>
</DD>
</DL>
<HR>
<A NAME="setNonce(long)"><!-- --></A><H3>
setNonce</H3>
<PRE>
public void <B>setNonce</B>(long&nbsp;nonce)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>