There was an error while loading. Please reload this page.
1 parent 5b20d64 commit 08a708eCopy full SHA for 08a708e
1 file changed
packages/neuron-wallet/src/services/sync/queue.ts
@@ -73,7 +73,11 @@ export default class Queue {
73
const blockHeaders: BlockHeader[] = blocks.map(block => block.header)
74
75
// 2. check blockHeaders
76
- await this.checkBlockHeader(blockHeaders)
+ const checkResult = await this.checkBlockHeader(blockHeaders)
77
+
78
+ if (checkResult.type === 'first-not-match') {
79
+ return
80
+ }
81
82
// 3. check and save
83
await this.getBlocksService.checkAndSave(blocks, this.lockHashes)
@@ -103,6 +107,8 @@ export default class Queue {
103
107
throw new Error('chain forked')
104
108
}
105
109
110
111
+ return checkResult
106
112
113
114
public push = (blockNumbers: string[]): void => {
0 commit comments