zcash-android-wallet-sdk/docs/-sdk-synchronizer/validate-consensus-branch.md

18 lines
1.0 KiB
Markdown
Raw Normal View History

2020-06-10 00:27:52 -07:00
[zcash-android-wallet-sdk](../../index.md) / [cash.z.ecc.android.sdk](../index.md) / [SdkSynchronizer](index.md) / [validateConsensusBranch](./validate-consensus-branch.md)
# validateConsensusBranch
`suspend fun validateConsensusBranch(): `[`ConsensusMatchType`](../../cash.z.ecc.android.sdk.validate/-consensus-match-type/index.md)
Validate whether the server and this SDK share the same consensus branch. This is
particularly important to check around network updates so that any wallet that's connected to
an incompatible server can surface that information effectively. For the SDK, the consensus
branch is used when creating transactions as each one needs to target a specific branch. This
function compares the server's branch id to this SDK's and returns information that helps
determine whether they match.
**Return**
an instance of [ConsensusMatchType](../../cash.z.ecc.android.sdk.validate/-consensus-match-type/index.md) that is essentially a wrapper for both branch ids
and provides helper functions for communicating detailed errors to the user.