Skip to content

Commit

Permalink
Call syncWithPeer directly from buildHeadState for updating root
Browse files Browse the repository at this point in the history
  • Loading branch information
Indigo Alpha committed Apr 5, 2024
1 parent 628135e commit 19adeea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/service/fullethereumservice.ts
Expand Up @@ -246,7 +246,8 @@ export class FullEthereumService extends Service {
// If during building FCU identifies a new root/height to sync to, evalueate new height with sync
// strategy and initiate state healing and fetcher root updates for snap sync
if (this.building) {
this.snapsync?.sync()
const peer = await this.snapsync?.best()
void this.snapsync?.syncWithPeer(peer)
}

Check warning on line 251 in packages/client/src/service/fullethereumservice.ts

View check run for this annotation

Codecov / codecov/patch

packages/client/src/service/fullethereumservice.ts#L250-L251

Added lines #L250 - L251 were not covered by tests
this.building = true

Expand Down

0 comments on commit 19adeea

Please sign in to comment.