3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

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;
}
}