GetDataMessage: add utilities

This commit is contained in:
Mike Hearn
2014-09-21 17:54:55 +02:00
parent ecec739438
commit ec320ecfd5

View File

@@ -55,4 +55,12 @@ public class GetDataMessage extends ListMessage {
public void addBlock(Sha256Hash hash) {
addItem(new InventoryItem(InventoryItem.Type.Block, hash));
}
public void addFilteredBlock(Sha256Hash hash) {
addItem(new InventoryItem(InventoryItem.Type.FilteredBlock, hash));
}
public Sha256Hash getHashOf(int i) {
return getItems().get(i).hash;
}
}