Index: src/com/google/bitcoin/core/BlockStore.java
===================================================================
--- src/com/google/bitcoin/core/BlockStore.java (revision 38)
+++ src/com/google/bitcoin/core/BlockStore.java (working copy)
@@ -26,7 +26,7 @@
*
* BlockStores are thread safe.
*/
-interface BlockStore {
+public interface BlockStore {
/**
* Saves the given block header+extra data. The key isn't specified explicitly as it can be calculated from the
* StoredBlock directly. Can throw if there is a problem with the underlying storage layer such as running out of
Index: src/com/google/bitcoin/core/StoredBlock.java
===================================================================
--- src/com/google/bitcoin/core/StoredBlock.java (revision 39)
+++ src/com/google/bitcoin/core/StoredBlock.java (working copy)
@@ -27,7 +27,7 @@
*
* StoredBlocks are put inside a {@link BlockStore} which saves them to memory or disk.
*/
-class StoredBlock {
+public class StoredBlock {
/**
* The block header this object wraps. The referenced block object must not have any transactions in it.
*/
@@ -45,12 +45,24 @@
*/
int height;
- StoredBlock(Block header, BigInteger chainWork, int height) {
+ public StoredBlock(Block header, BigInteger chainWork, int height) {
assert header.transactions == null : "Should not have transactions in a block header object";
this.header = header;
this.chainWork = chainWork;
this.height = height;
}
+
+ public Block getHeader() {
+ return header;
+ }
+
+ public BigInteger getChainWork() {
+ return chainWork;
+ }
+
+ public int getHeight() {
+ return height;
+ }
/** Returns true if this objects chainWork is higher than the others. */
boolean moreWorkThan(StoredBlock other) {
Original issue reported on code.google.com by andreas....@gmail.com on 26 Mar 2011 at 12:30
Original issue reported on code.google.com by
andreas....@gmail.com
on 26 Mar 2011 at 12:30