Skip to content

Commit 06dee24

Browse files
author
Micah Riggan
committed
fix(node): fix test
test checking block tip were broken
1 parent b4f0c34 commit 06dee24

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/bitcore-node/src/providers/chain-state/internal

packages/bitcore-node/src/providers/chain-state/internal/internal.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,11 @@ export class InternalStateProvider implements CSP.IChainStateService {
483483
}
484484

485485
async getLocalTip({ chain, network }) {
486-
return BlockModel.chainTips[chain][network];
486+
if (BlockModel.chainTips[chain] && BlockModel.chainTips[chain][network]) {
487+
return BlockModel.chainTips[chain][network];
488+
} else {
489+
return null;
490+
}
487491
}
488492

489493
async getLocatorHashes(params) {

0 commit comments

Comments
 (0)