Generic safety cleanup (#22)

* create checksum system for versioning
* minor changes to CI
* dart ffi cleanup
* update checksums
This commit is contained in:
cyan
2024-07-30 17:46:55 +02:00
committed by GitHub
parent 3b9928a665
commit 373588247b
26 changed files with 375 additions and 20 deletions
@@ -0,0 +1,8 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * MONERO_wallet2_api_c_h_sha256 = "b9c712f59873da33dfc4c9caa4850ee5cba4bf7310179dfc33af9d3029d9855a";
const char * MONERO_wallet2_api_c_cpp_sha256 = "7edf0905802faa48f66362a6d2ebf25f458107b67cd4abc6d01886c40f5634ef";
const char * MONERO_wallet2_api_c_exp_sha256 = "bfac0ee584f50bd9263ae453103530c2594b21aec8ae7622e8c192c027f5d6af";
const int MONERO_libwallet2_api_c_version = 48;
const char * MONERO_wallet2_api_c_date = "2024-07-30 15:06:42 +0000";
#endif
@@ -5,7 +5,7 @@
#include <cstring>
#include <thread>
#include "../../../../monero/src/wallet/api/wallet2_api.h"
#include "monero_checksum.h"
#ifdef __cplusplus
extern "C"
@@ -2020,6 +2020,21 @@ uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_ptr) {
return listener->cw_isNeedToRefresh();
};
const char* MONERO_checksum_wallet2_api_c_h() {
return MONERO_wallet2_api_c_h_sha256;
}
const char* MONERO_checksum_wallet2_api_c_cpp() {
return MONERO_wallet2_api_c_cpp_sha256;
}
const char* MONERO_checksum_wallet2_api_c_exp() {
return MONERO_wallet2_api_c_exp_sha256;
}
int MONERO_checksum_wallet2_api_c_version() {
return MONERO_libwallet2_api_c_version;
}
const char* MONERO_checksum_wallet2_api_c_date() {
return MONERO_wallet2_api_c_date;
}
// i hate windows
void MONERO_free(void* ptr) {
@@ -10,6 +10,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <unistd.h>
#include "monero_checksum.h"
#ifdef __cplusplus
extern "C"
@@ -1032,6 +1033,12 @@ extern ADDAPI uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_p
extern ADDAPI void MONERO_free(void* ptr);
extern ADDAPI const char* MONERO_checksum_wallet2_api_c_h();
extern ADDAPI const char* MONERO_checksum_wallet2_api_c_cpp();
extern ADDAPI const char* MONERO_checksum_wallet2_api_c_exp();
extern ADDAPI int MONERO_checksum_wallet2_api_c_version();
extern ADDAPI const char* MONERO_checksum_wallet2_api_c_date();
#ifdef __cplusplus
}
#endif