From 3deb0effb39b7dc2b26fc599b10e5aaa2227f9f4 Mon Sep 17 00:00:00 2001 From: shaozhuguang Date: Wed, 11 Sep 2019 16:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../blockchain/gateway/web/BlockBrowserController.java | 4 ++-- .../blockchain/ledger/core/TransactionEngineImpl.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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 162702ab..7de12a75 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 @@ -70,13 +70,13 @@ public class BlockBrowserController implements BlockchainExtendQueryService { @RequestMapping(method = RequestMethod.GET, path = "ledgers/{ledgerHash}/admininfo") @Override - public LedgerAdminInfo getLedgerAdminInfo(HashDigest ledgerHash) { + public LedgerAdminInfo getLedgerAdminInfo(@PathVariable(name = "ledgerHash") HashDigest ledgerHash) { return peerService.getQueryService().getLedgerAdminInfo(ledgerHash); } @RequestMapping(method = RequestMethod.GET, path = "ledgers/{ledgerHash}/participants") @Override - public ParticipantNode[] getConsensusParticipants(HashDigest ledgerHash) { + public ParticipantNode[] getConsensusParticipants(@PathVariable(name = "ledgerHash") HashDigest ledgerHash) { return peerService.getQueryService().getConsensusParticipants(ledgerHash); } diff --git a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/TransactionEngineImpl.java b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/TransactionEngineImpl.java index 0d429811..2d0fb55a 100644 --- a/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/TransactionEngineImpl.java +++ b/source/ledger/ledger-core/src/main/java/com/jd/blockchain/ledger/core/TransactionEngineImpl.java @@ -54,31 +54,31 @@ public class TransactionEngineImpl implements TransactionEngine { private class InnerTransactionBatchProcessor extends TransactionBatchProcessor { - private HashDigest ledgerHash; +// private HashDigest ledgerHash; /** * 创建交易批处理器; * * @param ledgerRepo 账本; * @param handlesRegisteration 操作处理对象注册表; - * @param blockHeight + * */ public InnerTransactionBatchProcessor(LedgerRepository ledgerRepo, OperationHandleRegisteration handlesRegisteration) { super(ledgerRepo, handlesRegisteration); - ledgerHash = ledgerRepo.getHash(); +// ledgerHash = ledgerRepo.getHash(); } @Override protected void onCommitted() { super.onCommitted(); - finishBatch(ledgerHash); + finishBatch(getLedgerHash()); } @Override protected void onCanceled() { super.onCanceled(); - finishBatch(ledgerHash); + finishBatch(getLedgerHash()); } }