diag: trace NativeAssetBalance.startSyncingBalance() entry/key/emission

Confirmed via 3 CI runs: HEZ (native asset) is present+enabled in the runtime
Chain object for Pezkuwi Asset Hub and gets dispatched to NativeAssetBalance
without any exception, yet its System.Account subscribe request never reaches
that chain's RPC connection at all - no error logged either. This traces
exactly how far execution gets: does startSyncingBalance() even get entered,
does getRuntime()/storageKey() complete, does subscribe()'s flow ever emit.
This commit is contained in:
2026-07-09 10:51:57 -07:00
parent d7cae696c8
commit 7a6b93a323
@@ -161,12 +161,17 @@ class NativeAssetBalance(
accountId: AccountId, accountId: AccountId,
subscriptionBuilder: SharedRequestsBuilder subscriptionBuilder: SharedRequestsBuilder
): Flow<BalanceSyncUpdate> { ): Flow<BalanceSyncUpdate> {
Log.d("BalancesDiag", "NativeAssetBalance.startSyncingBalance() ENTERED for ${chainAsset.symbol} on ${chain.name}")
val runtime = chainRegistry.getRuntime(chain.id) val runtime = chainRegistry.getRuntime(chain.id)
Log.d("BalancesDiag", "NativeAssetBalance: got runtime for ${chain.name}")
val key = runtime.metadata.system().storage("Account").storageKey(runtime, accountId) val key = runtime.metadata.system().storage("Account").storageKey(runtime, accountId)
Log.d("BalancesDiag", "NativeAssetBalance: computed key for ${chainAsset.symbol} on ${chain.name}: $key")
return subscriptionBuilder.subscribe(key) return subscriptionBuilder.subscribe(key)
.map { change -> .map { change ->
Log.d("BalancesDiag", "NativeAssetBalance: received change for ${chainAsset.symbol} on ${chain.name}")
val accountInfo = bindAccountInfoOrDefault(change.value, runtime) val accountInfo = bindAccountInfoOrDefault(change.value, runtime)
val assetChanged = assetCache.updateAsset(metaAccount.id, chain.utilityAsset, accountInfo) val assetChanged = assetCache.updateAsset(metaAccount.id, chain.utilityAsset, accountInfo)