Skip to content

Commit

Permalink
chore: skip _UpdateAddressBook (#1144)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
  • Loading branch information
0xivanov authored Nov 19, 2024
1 parent c85a351 commit a73c878
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ func _NewClient(network _Network, mirrorNetwork []string, ledgerId *LedgerID, sh
}

// We can't ask for AddressBook from non existent Mirror node
if len(mirrorNetwork) > 0 {
if len(mirrorNetwork) > 0 && shouldScheduleNetworkUpdate {
// Update the Addressbook, before the default timeout starts
client._UpdateAddressBook()
if shouldScheduleNetworkUpdate {
go client._ScheduleNetworkUpdate(ctx, client.defaultNetworkUpdatePeriod)
}
go client._ScheduleNetworkUpdate(ctx, client.defaultNetworkUpdatePeriod)
}

return &client
Expand Down

0 comments on commit a73c878

Please sign in to comment.