BoAT-X-Framework
BoAT-X-Framework copied to clipboard
chainmaker wallet create failed Number of wallets occupied
if (wallet_config_ptr != NULL) { memcpy(boatwalletStore_ptr, wallet_config_ptr, wallet_config_size); wallet_ptr = BoatHlchainmakerWalletInit((BoatHlchainmakerWalletConfig*)wallet_config_ptr);
if (wallet_ptr != NULL)
{
memcpy(boatwalletStore_ptr + wallet_config_size, &((BoatHlchainmakerWallet*)wallet_ptr)->user_cert_prikey_info.prikeyCtx, sizeof(BoatWalletPriKeyCtx));
if (wallet_name_str != NULL)
{
/* create persistent wallet / Overwrite existed configuration */
if (BOAT_SUCCESS != BoatPersistStore(wallet_name_str, boatwalletStore_ptr, wallet_config_size + sizeof(BoatWalletPriKeyCtx)))
{
BoatLog(BOAT_LOG_NORMAL, "persistent wallet create failed.");
g_boat_iot_sdk_context.wallet_list[i].is_used = BOAT_FALSE;
BoatFree(boatwalletStore_ptr);
return BOAT_ERROR_PERSISTER_STORE_FAIL;
}
}
else
{
/* create one-time wallet */
// nothing to do
BoatLog(BOAT_LOG_NORMAL, "onetime wallet create");
}
}
}