{"record":{"id":"e4e4d55ffaf33178","repo":"hyperledger/fabric","slug":"cannot-get-current-block-hash","errorCode":null,"errorMessage":"cannot get current block hash","messagePattern":"cannot get current block hash","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/deliverservice/deliveryclient.go","lineNumber":172,"sourceCode":"\t}\n\n\td.channelID = chainID\n\n\tgo func() {\n\t\td.blockDeliverer.DeliverBlocks()\n\t\tfinalizer()\n\t}()\n\treturn nil\n}\n\nfunc (d *deliverServiceImpl) createBlockDelivererCFT(chainID string, ledgerInfo blocksprovider.LedgerInfo) (*blocksprovider.Deliverer, error) {\n\theight, err := ledgerInfo.LedgerHeight()\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get ledger height\")\n\t}\n\tcurrentBlockHash, err := ledgerInfo.GetCurrentBlockHash()\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get current block hash\")\n\t}\n\tif height == 0 {\n\t\treturn nil, errors.New(\"cannot create a block deliverer because height=0\")\n\t}\n\tubv, err := deliverclient.NewBlockVerificationAssistantFromConfig(\n\t\td.conf.ChannelConfig, height-1, currentBlockHash, chainID, d.conf.CryptoProvider, flogging.MustGetLogger(\"common.deliverclient.blockverification\"),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogger.Debugf(\"Created an updatable block verifier from ChannelConfig, height: %d,`%+v`\", height, ubv)\n\n\tlogger.Infof(\"Creating a CFT (crash fault tolerant) BlockDeliverer for channel `%s`\", chainID)\n\tdc := &blocksprovider.Deliverer{\n\t\tChannelID: chainID,\n\t\tBlockHandler: &GossipBlockHandler{\n\t\t\tgossip:              d.conf.Gossip,\n\t\t\tblockGossipDisabled: !d.conf.DeliverServiceConfig.BlockGossipEnabled,","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/deliverservice/deliveryclient.go#L154-L190","documentation":"Returned by createBlockDelivererCFT when LedgerInfo.GetCurrentBlockHash() fails after the height was obtained. The deliverer needs the hash to verify chain continuity from the resume point, so the query failure prevents deliverer creation.","triggerScenarios":"Thrown at core/deliverservice/deliveryclient.go:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify ledger integrity and retry channel delivery start","Investigate the wrapped ledger error for corruption or I/O faults"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}