From fd4bd71ac23841dd13bc25d142155fa44b442ff7 Mon Sep 17 00:00:00 2001 From: huanghaiquan Date: Wed, 21 Aug 2019 23:52:15 +0800 Subject: [PATCH] rename; --- .../ledger/core/AccountPrivilege.java | 26 ------ .../blockchain/ledger/core/Authorization.java | 13 --- .../jd/blockchain/ledger/core/Gateway.java | 22 ----- .../ledger/core/LedgerAdminAccount.java | 85 ++++++------------- ...ntDataSet.java => ParticipantDataset.java} | 6 +- ...DataSet.java => RolePrivilegeDataset.java} | 6 +- ...rRoleDataSet.java => UserRoleDataset.java} | 14 ++- .../blockchain/ledger/LedgerMetaDataTest.java | 2 +- ...est.java => RolePrivilegeDatasetTest.java} | 9 +- ...aSetTest.java => UserRoleDatasetTest.java} | 6 +- .../jd/blockchain/ledger/ParticipantNode.java | 2 +- 11 files changed, 49 insertions(+), 142 deletions(-) delete mode 100644 source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/AccountPrivilege.java delete mode 100644 source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Authorization.java delete mode 100644 source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Gateway.java rename source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/{ParticipantDataSet.java => ParticipantDataset.java} (93%) rename source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/{RolePrivilegeDataSet.java => RolePrivilegeDataset.java} (97%) rename source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/{UserRoleDataSet.java => UserRoleDataset.java} (94%) rename source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/{RolePrivilegeDataSetTest.java => RolePrivilegeDatasetTest.java} (87%) rename source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/{UserRoleDataSetTest.java => UserRoleDatasetTest.java} (93%) diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/AccountPrivilege.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/AccountPrivilege.java deleted file mode 100644 index c57debff..00000000 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/AccountPrivilege.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jd.blockchain.ledger.core; - -public interface AccountPrivilege { - - /** - * 数据“读”的操作码; - * - * @return - */ - byte getReadingOpCode(); - - /** - * “写”的操作码; - * - * @return - */ - byte getWrittingOpCode(); - - /** - * 其它的扩展操作码; - * - * @return - */ - byte[] getExtOpCodes(); - -} diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Authorization.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Authorization.java deleted file mode 100644 index 44c86d57..00000000 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Authorization.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.jd.blockchain.ledger.core; - -/** - * {@link Authorization} 抽象了对特定用户/角色的授权信息; - * - * @author huanghaiquan - * - */ -public class Authorization { - - - -} \ No newline at end of file diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Gateway.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Gateway.java deleted file mode 100644 index 6874d8aa..00000000 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/Gateway.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.jd.blockchain.ledger.core; - -import com.jd.blockchain.ledger.ParticipantNode; - -/** - * @author hhq - * @version 1.0 - * @created 14-6��-2018 12:13:32 - */ -public class Gateway extends Node { - - public ParticipantNode m_Participant; - - public Gateway(){ - - } - - public void finalize() throws Throwable { - super.finalize(); - } - -} \ No newline at end of file diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/LedgerAdminAccount.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/LedgerAdminAccount.java index e120525c..0bb3b75a 100644 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/LedgerAdminAccount.java +++ b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/LedgerAdminAccount.java @@ -38,12 +38,10 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { private final Bytes metaPrefix; private final Bytes settingPrefix; - private final Bytes rolePrivilegePrefix; - private final Bytes userRolePrefix; private LedgerMetadata_V2 origMetadata; - private LedgerMetadataImpl metadata; + private LedgerMetadataInfo metadata; /** * 原来的账本设置; @@ -58,22 +56,23 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { /** * 账本的参与节点; */ - private ParticipantDataSet participants; + private ParticipantDataset participants; - private RolePrivilegeDataSet rolePrivileges; + /** + * “角色-权限”数据集; + */ + private RolePrivilegeDataset rolePrivileges; - private UserRoleDataSet userRoles; + /** + * “用户-角色”数据集; + */ + private UserRoleDataset userRoles; /** * 账本参数配置; */ private LedgerSettings settings; - // /** - // * 账本的全局权限设置; - // */ - // private PrivilegeDataSet privileges; - private ExPolicyKVStorage storage; private HashDigest adminAccountHash; @@ -115,25 +114,14 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { VersioningKVStorage versioningStorage) { this.metaPrefix = Bytes.fromString(keyPrefix + LEDGER_META_PREFIX); this.settingPrefix = Bytes.fromString(keyPrefix + LEDGER_SETTING_PREFIX); - this.rolePrivilegePrefix = Bytes.fromString(keyPrefix + ROLE_PRIVILEGE_PREFIX); - this.userRolePrefix = Bytes.fromString(keyPrefix + USER_ROLE_PREFIX); ParticipantNode[] parties = initSetting.getConsensusParticipants(); if (parties.length == 0) { throw new LedgerException("No participant!"); } - // 检查参与者列表是否已经按照 id 升序排列,并且 id 不冲突; - // 注:参与者的 id 要求从 0 开始编号,顺序依次递增,不允许跳空; - for (int i = 0; i < parties.length; i++) { - // if (parties[i].getAddress() != i) { - // throw new LedgerException("The id of participant isn't match the order of the - // participant list!"); - // } - } - // 初始化元数据; - this.metadata = new LedgerMetadataImpl(); + this.metadata = new LedgerMetadataInfo(); this.metadata.setSeed(initSetting.getLedgerSeed()); // 新配置; this.settings = new LedgerConfiguration(initSetting.getConsensusProvider(), initSetting.getConsensusSettings(), @@ -144,7 +132,7 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { // 基于原配置初始化参与者列表; String partiPrefix = keyPrefix + LEDGER_PARTICIPANT_PREFIX; - this.participants = new ParticipantDataSet(previousSettings.getCryptoSetting(), partiPrefix, exPolicyStorage, + this.participants = new ParticipantDataset(previousSettings.getCryptoSetting(), partiPrefix, exPolicyStorage, versioningStorage); for (ParticipantNode p : parties) { @@ -152,11 +140,11 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { } String rolePrivilegePrefix = keyPrefix + ROLE_PRIVILEGE_PREFIX; - this.rolePrivileges = new RolePrivilegeDataSet(this.settings.getCryptoSetting(), rolePrivilegePrefix, + this.rolePrivileges = new RolePrivilegeDataset(this.settings.getCryptoSetting(), rolePrivilegePrefix, exPolicyStorage, versioningStorage); String userRolePrefix = keyPrefix + USER_ROLE_PREFIX; - this.userRoles = new UserRoleDataSet(this.settings.getCryptoSetting(), userRolePrefix, exPolicyStorage, + this.userRoles = new UserRoleDataset(this.settings.getCryptoSetting(), userRolePrefix, exPolicyStorage, versioningStorage); // 初始化其它属性; @@ -168,38 +156,26 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { VersioningKVStorage versioningKVStorage, boolean readonly) { this.metaPrefix = Bytes.fromString(keyPrefix + LEDGER_META_PREFIX); this.settingPrefix = Bytes.fromString(keyPrefix + LEDGER_SETTING_PREFIX); - this.rolePrivilegePrefix = Bytes.fromString(keyPrefix + ROLE_PRIVILEGE_PREFIX); - this.userRolePrefix = Bytes.fromString(keyPrefix + USER_ROLE_PREFIX); this.storage = kvStorage; this.readonly = readonly; this.origMetadata = loadAndVerifyMetadata(adminAccountHash); - this.metadata = new LedgerMetadataImpl(origMetadata); + this.metadata = new LedgerMetadataInfo(origMetadata); this.settings = loadAndVerifySettings(metadata.getSettingsHash()); // 复制记录一份配置作为上一个区块的原始配置,该实例仅供读取,不做修改,也不会回写到存储; this.previousSettings = new LedgerConfiguration(settings); this.previousSettingHash = metadata.getSettingsHash(); this.adminAccountHash = adminAccountHash; - // this.privileges = new PrivilegeDataSet(metadata.getPrivilegesHash(), - // metadata.getSetting().getCryptoSetting(), - // PrefixAppender.prefix(LEDGER_PRIVILEGE_PREFIX, kvStorage), - // PrefixAppender.prefix(LEDGER_PRIVILEGE_PREFIX, versioningKVStorage), - // readonly); - - // this.participants = new ParticipantDataSet(metadata.getParticipantsHash(), - // previousSetting.getCryptoSetting(), - // PrefixAppender.prefix(LEDGER_PARTICIPANT_PREFIX, kvStorage), - // PrefixAppender.prefix(LEDGER_PARTICIPANT_PREFIX, versioningKVStorage), - // readonly); + String partiPrefix = keyPrefix + LEDGER_PARTICIPANT_PREFIX; - this.participants = new ParticipantDataSet(metadata.getParticipantsHash(), previousSettings.getCryptoSetting(), + this.participants = new ParticipantDataset(metadata.getParticipantsHash(), previousSettings.getCryptoSetting(), partiPrefix, kvStorage, versioningKVStorage, readonly); String rolePrivilegePrefix = keyPrefix + ROLE_PRIVILEGE_PREFIX; - this.rolePrivileges = new RolePrivilegeDataSet(metadata.getRolePrivilegesHash(), + this.rolePrivileges = new RolePrivilegeDataset(metadata.getRolePrivilegesHash(), previousSettings.getCryptoSetting(), rolePrivilegePrefix, kvStorage, versioningKVStorage, readonly); String userRolePrefix = keyPrefix + USER_ROLE_PREFIX; - this.userRoles = new UserRoleDataSet(metadata.getUserRolesHash(), previousSettings.getCryptoSetting(), + this.userRoles = new UserRoleDataset(metadata.getUserRolesHash(), previousSettings.getCryptoSetting(), userRolePrefix, kvStorage, versioningKVStorage, readonly); } @@ -297,19 +273,6 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { return participants.getParticipantCount(); } - // /* - // * (non-Javadoc) - // * - // * @see - // * - // com.jd.blockchain.ledger.core.LedgerAdministration#getParticipant(java.lang. - // * String) - // */ - // @Override - // public ParticipantNode getParticipant(int id) { - // return participants.getParticipant(id); - // } - @Override public ParticipantNode[] getParticipants() { return participants.getParticipants(); @@ -397,7 +360,7 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { return BinaryProtocol.decode(bytes); } - private byte[] serializeMetadata(LedgerMetadataImpl config) { + private byte[] serializeMetadata(LedgerMetadataInfo config) { return BinaryProtocol.encode(config, LedgerMetadata_V2.class); } @@ -407,10 +370,10 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { return; } participants.cancel(); - metadata = new LedgerMetadataImpl(origMetadata); + metadata = new LedgerMetadataInfo(origMetadata); } - public static class LedgerMetadataImpl implements LedgerMetadata_V2 { + public static class LedgerMetadataInfo implements LedgerMetadata_V2 { private byte[] seed; @@ -424,10 +387,10 @@ public class LedgerAdminAccount implements Transactional, LedgerAdminInfo { private HashDigest userRolesHash; - public LedgerMetadataImpl() { + public LedgerMetadataInfo() { } - public LedgerMetadataImpl(LedgerMetadata_V2 metadata) { + public LedgerMetadataInfo(LedgerMetadata_V2 metadata) { this.seed = metadata.getSeed(); this.participantsHash = metadata.getParticipantsHash(); this.settingsHash = metadata.getSettingsHash(); diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataSet.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataset.java similarity index 93% rename from source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataSet.java rename to source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataset.java index 9c015a6f..05267228 100644 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataSet.java +++ b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/ParticipantDataset.java @@ -11,7 +11,7 @@ import com.jd.blockchain.storage.service.VersioningKVStorage; import com.jd.blockchain.utils.Bytes; import com.jd.blockchain.utils.Transactional; -public class ParticipantDataSet implements Transactional, MerkleProvable { +public class ParticipantDataset implements Transactional, MerkleProvable { static { DataContractRegistry.register(ParticipantNode.class); @@ -19,12 +19,12 @@ public class ParticipantDataSet implements Transactional, MerkleProvable { private MerkleDataSet dataset; - public ParticipantDataSet(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, + public ParticipantDataset(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage) { dataset = new MerkleDataSet(cryptoSetting, prefix, exPolicyStorage, verStorage); } - public ParticipantDataSet(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, + public ParticipantDataset(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage, boolean readonly) { dataset = new MerkleDataSet(merkleRootHash, cryptoSetting, prefix, exPolicyStorage, verStorage, readonly); } diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataSet.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataset.java similarity index 97% rename from source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataSet.java rename to source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataset.java index e221bb06..f012e8db 100644 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataSet.java +++ b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/RolePrivilegeDataset.java @@ -10,16 +10,16 @@ import com.jd.blockchain.storage.service.VersioningKVStorage; import com.jd.blockchain.utils.Bytes; import com.jd.blockchain.utils.Transactional; -public class RolePrivilegeDataSet implements Transactional, MerkleProvable, RolePrivilegeSettings { +public class RolePrivilegeDataset implements Transactional, MerkleProvable, RolePrivilegeSettings { private MerkleDataSet dataset; - public RolePrivilegeDataSet(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, + public RolePrivilegeDataset(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage) { dataset = new MerkleDataSet(cryptoSetting, prefix, exPolicyStorage, verStorage); } - public RolePrivilegeDataSet(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, + public RolePrivilegeDataset(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage, boolean readonly) { dataset = new MerkleDataSet(merkleRootHash, cryptoSetting, prefix, exPolicyStorage, verStorage, readonly); } diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataSet.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataset.java similarity index 94% rename from source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataSet.java rename to source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataset.java index 9fd9b834..ec7345c6 100644 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataSet.java +++ b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/UserRoleDataset.java @@ -11,16 +11,22 @@ import com.jd.blockchain.storage.service.VersioningKVStorage; import com.jd.blockchain.utils.Bytes; import com.jd.blockchain.utils.Transactional; -public class UserRoleDataSet implements Transactional, MerkleProvable, UserRoleSettings { - +/** + * User-Role authorization data set; + * + * @author huanghaiquan + * + */ +public class UserRoleDataset implements Transactional, MerkleProvable, UserRoleSettings { + private MerkleDataSet dataset; - public UserRoleDataSet(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, + public UserRoleDataset(CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage) { dataset = new MerkleDataSet(cryptoSetting, prefix, exPolicyStorage, verStorage); } - public UserRoleDataSet(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, + public UserRoleDataset(HashDigest merkleRootHash, CryptoSetting cryptoSetting, String prefix, ExPolicyKVStorage exPolicyStorage, VersioningKVStorage verStorage, boolean readonly) { dataset = new MerkleDataSet(merkleRootHash, cryptoSetting, prefix, exPolicyStorage, verStorage, readonly); } diff --git a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/LedgerMetaDataTest.java b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/LedgerMetaDataTest.java index 54eeab93..22dbef11 100644 --- a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/LedgerMetaDataTest.java +++ b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/LedgerMetaDataTest.java @@ -79,7 +79,7 @@ public class LedgerMetaDataTest { // new Bytes(consensusSettingBytes), cryptoConfig); HashDigest settingsHash = Crypto.getHashFunction("SHA256").hash(consensusSettingBytes); - LedgerAdminAccount.LedgerMetadataImpl ledgerMetadata = new LedgerAdminAccount.LedgerMetadataImpl(); + LedgerAdminAccount.LedgerMetadataInfo ledgerMetadata = new LedgerAdminAccount.LedgerMetadataInfo(); ledgerMetadata.setSeed(seed); ledgerMetadata.setSettingsHash(settingsHash); diff --git a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDataSetTest.java b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDatasetTest.java similarity index 87% rename from source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDataSetTest.java rename to source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDatasetTest.java index 6763162c..47031e56 100644 --- a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDataSetTest.java +++ b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/RolePrivilegeDatasetTest.java @@ -2,7 +2,6 @@ package test.com.jd.blockchain.ledger; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import org.junit.Test; @@ -14,12 +13,12 @@ import com.jd.blockchain.crypto.service.classic.ClassicCryptoService; import com.jd.blockchain.crypto.service.sm.SMCryptoService; import com.jd.blockchain.ledger.core.CryptoConfig; import com.jd.blockchain.ledger.core.LedgerPermission; -import com.jd.blockchain.ledger.core.RolePrivilegeDataSet; +import com.jd.blockchain.ledger.core.RolePrivilegeDataset; import com.jd.blockchain.ledger.core.RolePrivileges; import com.jd.blockchain.ledger.core.TransactionPermission; import com.jd.blockchain.storage.service.utils.MemoryKVStorage; -public class RolePrivilegeDataSetTest { +public class RolePrivilegeDatasetTest { private static final String[] SUPPORTED_PROVIDER_NAMES = { ClassicCryptoService.class.getName(), SMCryptoService.class.getName() }; @@ -45,7 +44,7 @@ public class RolePrivilegeDataSetTest { String roleName = "DEFAULT"; String prefix = "role-privilege/"; - RolePrivilegeDataSet rolePrivilegeDataset = new RolePrivilegeDataSet(cryptoConfig, prefix, testStorage, + RolePrivilegeDataset rolePrivilegeDataset = new RolePrivilegeDataset(cryptoConfig, prefix, testStorage, testStorage); rolePrivilegeDataset.addRolePrivilege(roleName, new LedgerPermission[] { LedgerPermission.REGISTER_USER }, new TransactionPermission[] { TransactionPermission.CONTRACT_OPERATION }); @@ -56,7 +55,7 @@ public class RolePrivilegeDataSetTest { assertNotNull(rolePrivilege); HashDigest rootHash = rolePrivilegeDataset.getRootHash(); - RolePrivilegeDataSet newRolePrivilegeDataset = new RolePrivilegeDataSet(rootHash, cryptoConfig, prefix, + RolePrivilegeDataset newRolePrivilegeDataset = new RolePrivilegeDataset(rootHash, cryptoConfig, prefix, testStorage, testStorage, true); rolePrivilege = newRolePrivilegeDataset.getRolePrivilege(roleName); assertNotNull(rolePrivilege); diff --git a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDataSetTest.java b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDatasetTest.java similarity index 93% rename from source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDataSetTest.java rename to source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDatasetTest.java index 41a59be1..2dd586d3 100644 --- a/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDataSetTest.java +++ b/source/ledger/ledger-core/src/test/java/test/com/jd/blockchain/ledger/UserRoleDatasetTest.java @@ -15,11 +15,11 @@ import com.jd.blockchain.ledger.BlockchainKeyGenerator; import com.jd.blockchain.ledger.BlockchainKeypair; import com.jd.blockchain.ledger.core.CryptoConfig; import com.jd.blockchain.ledger.core.RolesPolicy; -import com.jd.blockchain.ledger.core.UserRoleDataSet; +import com.jd.blockchain.ledger.core.UserRoleDataset; import com.jd.blockchain.ledger.core.UserRoles; import com.jd.blockchain.storage.service.utils.MemoryKVStorage; -public class UserRoleDataSetTest { +public class UserRoleDatasetTest { private static final String[] SUPPORTED_PROVIDER_NAMES = { ClassicCryptoService.class.getName(), SMCryptoService.class.getName() }; @@ -42,7 +42,7 @@ public class UserRoleDataSetTest { MemoryKVStorage testStorage = new MemoryKVStorage(); String prefix = "user-roles/"; - UserRoleDataSet userRolesDataset = new UserRoleDataSet(cryptoConfig, prefix, testStorage, testStorage); + UserRoleDataset userRolesDataset = new UserRoleDataset(cryptoConfig, prefix, testStorage, testStorage); BlockchainKeypair bckp = BlockchainKeyGenerator.getInstance().generate(); String[] authRoles = { "DEFAULT", "MANAGER" }; diff --git a/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/ParticipantNode.java b/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/ParticipantNode.java index 8d4075cb..efc55c12 100644 --- a/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/ParticipantNode.java +++ b/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/ParticipantNode.java @@ -14,7 +14,7 @@ import com.jd.blockchain.utils.Bytes; * */ @DataContract(code = DataCodes.METADATA_CONSENSUS_PARTICIPANT) -public interface ParticipantNode {// extends ConsensusNode, ParticipantInfo { +public interface ParticipantNode { /** * 节点的顺序编号;