src/securityPolicy.c
static inline bool is_standard_base_address(const addressParams_t* addressParams)
{
	ASSERT(isValidAddressParams(addressParams));

#define CHECK(cond) if (!(cond)) return false
	CHECK(addressParams->type == BASE_PAYMENT_KEY_STAKE_KEY);
	CHECK(addressParams->stakingDataSource == STAKING_KEY_PATH);

	CHECK(bip44_classifyPath(&addressParams->spendingKeyPath) == PATH_ORDINARY_SPENDING_KEY);
	CHECK(bip44_isPathReasonable(&addressParams->spendingKeyPath));

	CHECK(bip44_classifyPath(&addressParams->stakingKeyPath) == PATH_ORDINARY_STAKING_KEY);
	CHECK(bip44_isPathReasonable(&addressParams->stakingKeyPath));

	CHECK(
	        bip44_getAccount(&addressParams->stakingKeyPath) ==
	        bip44_getAccount(&addressParams->spendingKeyPath)
	);

	return true;
#undef CHECK
}
// staking key path has the same account as the spending key path
staking key path has the same account as the spending key path
staking key path has the same account as the spending key path
static inline bool is_standard_base_address(const addressParams_t* addressParams)
{
	ASSERT(isValidAddressParams(addressParams));
#define CHECK(cond) if (!(cond)) return false
	CHECK(addressParams->type == BASE_PAYMENT_KEY_STAKE_KEY);
	CHECK(addressParams->stakingDataSource == STAKING_KEY_PATH);
	CHECK(bip44_classifyPath(&addressParams->spendingKeyPath) == PATH_ORDINARY_SPENDING_KEY);
	CHECK(bip44_isPathReasonable(&addressParams->spendingKeyPath));
	CHECK(bip44_classifyPath(&addressParams->stakingKeyPath) == PATH_ORDINARY_STAKING_KEY);
	CHECK(bip44_isPathReasonable(&addressParams->stakingKeyPath));
	CHECK(
	        bip44_getAccount(&addressParams->stakingKeyPath) ==
	        bip44_getAccount(&addressParams->spendingKeyPath)
	);
	return true;
#undef CHECK
}
static inline bool is_standard_base_address ( const addressParams_t * addressParams ) { ASSERT ( isValidAddressParams ( addressParams ) ) ; #define CHECK ( cond )  if (!(cond)) return false CHECK ( addressParams -> type == BASE_PAYMENT_KEY_STAKE_KEY ) ; CHECK ( addressParams -> stakingDataSource == STAKING_KEY_PATH ) ; CHECK ( bip44_classifyPath ( & addressParams -> spendingKeyPath ) == PATH_ORDINARY_SPENDING_KEY ) ; CHECK ( bip44_isPathReasonable ( & addressParams -> spendingKeyPath ) ) ; CHECK ( bip44_classifyPath ( & addressParams -> stakingKeyPath ) == PATH_ORDINARY_STAKING_KEY ) ; CHECK ( bip44_isPathReasonable ( & addressParams -> stakingKeyPath ) ) ; CHECK ( bip44_getAccount ( & addressParams -> stakingKeyPath ) == bip44_getAccount ( & addressParams -> spendingKeyPath ) ) ; return true ; #undef  CHECK }
staking key path has the same account as the spending key path
staking key path has the same account as the spending key path