Browse Source

modify cid's start value

tags/1.1.11^0
shaozhuguang 5 years ago
parent
commit
66c65c653b
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      source/consensus/consensus-bftsmart/src/main/java/com/jd/blockchain/consensus/bftsmart/service/BftsmartNodeServer.java
  2. +1
    -1
      source/peer/src/main/java/com/jd/blockchain/peer/web/ManagementController.java

+ 1
- 1
source/consensus/consensus-bftsmart/src/main/java/com/jd/blockchain/consensus/bftsmart/service/BftsmartNodeServer.java View File

@@ -564,7 +564,7 @@ public class BftsmartNodeServer extends DefaultRecoverable implements NodeServer

try {
LOGGER.debug("Start replica...[ID=" + getId() + "]");
this.replica = new ServiceReplica(tomConfig, this, this, (int)(this.stateHolder.lastCid - 1));
this.replica = new ServiceReplica(tomConfig, this, this, (int)(this.stateHolder.lastCid));
this.topology = new BftsmartTopology(replica.getReplicaContext().getCurrentView());
initOutTopology();
status = Status.RUNNING;


+ 1
- 1
source/peer/src/main/java/com/jd/blockchain/peer/web/ManagementController.java View File

@@ -249,7 +249,7 @@ public class ManagementController implements LedgerBindingConfigAware, PeerManag

// 注册快照状态
consensusStateManager.setupState(ledgerHash.toBase58(), new BlockStateSnapshot(
ledgerRepository.retrieveLatestBlockHeight(), ledgerHash), null);
ledgerRepository.retrieveLatestBlockHeight() - 1, ledgerHash), null);
NodeServer server = provider.getServerFactory().setupServer(serverSettings, consensusMessageHandler,
consensusStateManager);
ledgerPeers.put(ledgerHash, server);


Loading…
Cancel
Save