avoid style check issue with `syncAggregate` (#6013)

Style check confuses `func syncAggregate` because it accesses some other
object's `sync_aggregate` member in the body. Rename the func to avoid.
This commit is contained in:
Etan Kissling 2024-03-02 02:54:37 +01:00 committed by GitHub
parent 8015c0bb47
commit d8b8aee7b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ func lightClientHeader(
lcDataForkAtConsensusFork(typeof(blck).kind), LightClientDataFork.Altair)
ForkedLightClientHeader.init(blck.toLightClientHeader(lcDataFork))
func syncAggregate(
func sync_aggregate(
blck: ForkyTrustedSignedBeaconBlock): SyncAggregate =
blck.asSigned().message.body.sync_aggregate
@ -140,7 +140,7 @@ proc getExistingSyncAggregate(
let res = withBlck(bdata.get):
when consensusFork >= ConsensusFork.Altair:
Opt.some forkyBlck.syncAggregate()
Opt.some forkyBlck.sync_aggregate()
else:
return Opt.none(SyncAggregate)
dag.cacheRecentSyncAggregate(bid, res.get)
@ -482,7 +482,7 @@ proc cacheLightClientData(
if dag.lcDataStore.cache.data.hasKeyOrPut(bid, cachedData):
doAssert false, "Redundant `cacheLightClientData` call"
dag.cacheRecentLightClientHeader(bid, blck.lightClientHeader())
dag.cacheRecentSyncAggregate(bid, blck.syncAggregate())
dag.cacheRecentSyncAggregate(bid, blck.sync_aggregate())
func shouldImportLcData(dag: ChainDAGRef): bool =
dag.lcDataStore.importMode != LightClientDataImportMode.None and