more sync code
This commit is contained in:
@@ -35,7 +35,6 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
|
||||
}
|
||||
|
||||
//ConfigModelI* conf = nullptr;
|
||||
CRDTNotes* notes = nullptr;
|
||||
CRDTNotesEventI* notes_sync = nullptr;
|
||||
Contact3Registry* cr = nullptr;
|
||||
ToxI* t = nullptr;
|
||||
@@ -44,7 +43,6 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
|
||||
|
||||
{ // make sure required types are loaded
|
||||
//conf = RESOLVE_INSTANCE(ConfigModelI);
|
||||
notes = RESOLVE_INSTANCE(CRDTNotes);
|
||||
notes_sync = RESOLVE_INSTANCE(CRDTNotesEventI);
|
||||
cr = RESOLVE_INSTANCE(Contact3Registry);
|
||||
t = RESOLVE_INSTANCE(ToxI);
|
||||
@@ -56,11 +54,6 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
|
||||
//return 2;
|
||||
//}
|
||||
|
||||
if (notes == nullptr) {
|
||||
std::cerr << "PLUGIN CRDTNTS missing CRDTNotes\n";
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (notes_sync == nullptr) {
|
||||
std::cerr << "PLUGIN CRDTNTS missing CRDTNotesEventI\n";
|
||||
return 2;
|
||||
@@ -89,7 +82,7 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
|
||||
|
||||
// static store, could be anywhere tho
|
||||
// construct with fetched dependencies
|
||||
g_crdtn_ts = std::make_unique<CRDTNotesToxSync>(*notes, *notes_sync, *cr, *t, *tep, *tcm);
|
||||
g_crdtn_ts = std::make_unique<CRDTNotesToxSync>(*notes_sync, *cr, *t, *tep, *tcm);
|
||||
|
||||
// register types
|
||||
PROVIDE_INSTANCE(CRDTNotesToxSync, "CRDTNotesToxSync", g_crdtn_ts.get());
|
||||
|
Reference in New Issue
Block a user