forked from DNAProject/DNA-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockchainAbility.java
More file actions
40 lines (32 loc) · 991 Bytes
/
Copy pathBlockchainAbility.java
File metadata and controls
40 lines (32 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package DNA.Core;
import java.util.EnumSet;
/**
* 表示特定区块链实现所提供的功能
*/
public enum BlockchainAbility {
/**
* 必须实现的虚函数:GetBlockAndHeight, GetBlockHeight, GetNextBlock, GetNextBlockHash, GetSysFeeAmount
*/
BlockIndexes(0x01),
/**
* 必须实现的虚函数:ContainsAsset, GetAssets, GetEnrollments
*/
TransactionIndexes(0x02),
/**
* 必须实现的虚函数:ContainsUnspent, GetUnclaimed, GetUnspent, GetVotes, IsDoubleSpend
*/
UnspentIndexes(0x04),
/**
* 必须实现的虚函数:GetQuantityIssued
*/
Statistics(0x08);
public static final EnumSet<BlockchainAbility> None = EnumSet.noneOf(BlockchainAbility.class);
public static final EnumSet<BlockchainAbility> All = EnumSet.allOf(BlockchainAbility.class);
private byte value;
BlockchainAbility(int v) {
value = (byte)v;
}
public byte getByte() {
return value;
}
}