1// Copyright 2015 Keybase, Inc. All rights reserved. Use of
2// this source code is governed by the included BSD license.
3
4package libkb
5
6func CheckTracking(g *GlobalContext) error {
7	// If we load a UPAK with the ForcePoll(true) flag, we're going to
8	// check our local UPAK against the live Merkle tree. On the case of
9	// a fresh UPAK, then no op. On the case of a stale UPAK then we trigger
10	// a LoadUser, which will send UserChanged as it refreshes.
11	m := NewMetaContextBackground(g)
12	arg := NewLoadUserArgWithMetaContext(m).WithUID(m.CurrentUID()).WithSelf(true).WithForcePoll(true)
13	_, _, err := g.GetUPAKLoader().LoadV2(arg)
14	return err
15}
16