diff --git a/source/deployment/deployment-peer/src/main/resources/config/init/ledger.init b/source/deployment/deployment-peer/src/main/resources/config/init/ledger.init index e84f24f5..8f06ac57 100644 --- a/source/deployment/deployment-peer/src/main/resources/config/init/ledger.init +++ b/source/deployment/deployment-peer/src/main/resources/config/init/ledger.init @@ -87,7 +87,7 @@ cons_parti.0.consensus.host=127.0.0.1 #第0个参与方的共识服务的端口; cons_parti.0.consensus.port=8900 #第0个参与方的共识服务是否开启安全连接; -cons_parti.0.consensus.secure=true +cons_parti.0.consensus.secure=false #第0个参与方的账本初始服务的主机; cons_parti.0.initializer.host=127.0.0.1 diff --git a/source/gateway/src/main/java/com/jd/blockchain/gateway/web/BlockBrowserController.java b/source/gateway/src/main/java/com/jd/blockchain/gateway/web/BlockBrowserController.java index b82ba94f..97780f62 100644 --- a/source/gateway/src/main/java/com/jd/blockchain/gateway/web/BlockBrowserController.java +++ b/source/gateway/src/main/java/com/jd/blockchain/gateway/web/BlockBrowserController.java @@ -597,7 +597,7 @@ public class BlockBrowserController implements BlockchainExtendQueryService { public BlockchainIdentity[] getUsers(@PathVariable(name = "ledgerHash") HashDigest ledgerHash, @RequestParam(name = "fromIndex", required = false, defaultValue = "0") int fromIndex, @RequestParam(name = "count", required = false, defaultValue = "-1") int count) { - return peerService.getQueryService().getUsers(ledgerHash, fromIndex, count); + return revertAccountHeader(peerService.getQueryService().getUsers(ledgerHash, fromIndex, count)); } @RequestMapping(method = RequestMethod.GET, path = "ledgers/{ledgerHash}/accounts") @@ -605,7 +605,7 @@ public class BlockBrowserController implements BlockchainExtendQueryService { public BlockchainIdentity[] getDataAccounts(@PathVariable(name = "ledgerHash") HashDigest ledgerHash, @RequestParam(name = "fromIndex", required = false, defaultValue = "0") int fromIndex, @RequestParam(name = "count", required = false, defaultValue = "-1") int count) { - return peerService.getQueryService().getDataAccounts(ledgerHash, fromIndex, count); + return revertAccountHeader(peerService.getQueryService().getDataAccounts(ledgerHash, fromIndex, count)); } @RequestMapping(method = RequestMethod.GET, path = "ledgers/{ledgerHash}/contracts") @@ -613,20 +613,20 @@ public class BlockBrowserController implements BlockchainExtendQueryService { public BlockchainIdentity[] getContractAccounts(@PathVariable(name = "ledgerHash") HashDigest ledgerHash, @RequestParam(name = "fromIndex", required = false, defaultValue = "0") int fromIndex, @RequestParam(name = "count", required = false, defaultValue = "-1") int count) { - return peerService.getQueryService().getContractAccounts(ledgerHash, fromIndex, count); + return revertAccountHeader(peerService.getQueryService().getContractAccounts(ledgerHash, fromIndex, count)); } -// /** -// * reverse the AccountHeader[] content; the latest record show first; -// * @return -// */ -// private AccountHeader[] revertAccountHeader(AccountHeader[] accountHeaders){ -// AccountHeader[] accounts = new AccountHeader[accountHeaders.length]; -// if(accountHeaders!=null && accountHeaders.length>0){ -// for (int i = 0; i < accountHeaders.length; i++) { -// accounts[accountHeaders.length-1-i] = accountHeaders[i]; -// } -// } -// return accounts; -// } + /** + * reverse the BlockchainIdentity[] content; the latest record show first; + * @return + */ + private BlockchainIdentity[] revertAccountHeader(BlockchainIdentity[] accountHeaders){ + BlockchainIdentity[] accounts = new BlockchainIdentity[accountHeaders.length]; + if(accountHeaders!=null && accountHeaders.length>0){ + for (int i = 0; i < accountHeaders.length; i++) { + accounts[accountHeaders.length-1-i] = accountHeaders[i]; + } + } + return accounts; + } } diff --git a/source/manager/manager-model/src/main/java/com/jd/blockchain/ump/model/UmpConstant.java b/source/manager/manager-model/src/main/java/com/jd/blockchain/ump/model/UmpConstant.java index 216a1e85..de388c8b 100644 --- a/source/manager/manager-model/src/main/java/com/jd/blockchain/ump/model/UmpConstant.java +++ b/source/manager/manager-model/src/main/java/com/jd/blockchain/ump/model/UmpConstant.java @@ -16,7 +16,7 @@ public class UmpConstant { public static final String PRIVATE_KEY_SUFFIX = ".priv"; - public static final String PUBLIC_KEY_SUFFIX = ".priv"; + public static final String PUBLIC_KEY_SUFFIX = ".pub"; public static final String PWD_SUFFIX = ".pwd";