Skip to content

Commit

Permalink
Merge pull request #33 from DeckerSU/static-dev
Browse files Browse the repository at this point in the history
0.7.1-beta2: static-dev -> static
  • Loading branch information
DeckerSU authored Sep 23, 2021
2 parents d8dbd47 + a1c8fec commit 8479430
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 7)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 7
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 0
#define CLIENT_VERSION_BUILD 1

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
7 changes: 3 additions & 4 deletions src/komodo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char
}
else if ( func == 'N' || func == 'M' )
{
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(fp, ht, func == 'M');
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(fp, ht, dest, func == 'M');
komodo_eventadd_notarized(sp, symbol, ht, evt);
}
else if ( func == 'U' ) // deprecated
Expand Down Expand Up @@ -134,7 +134,7 @@ int32_t komodo_parsestatefiledata(struct komodo_state *sp,uint8_t *filedata,long
else if ( func == 'N' || func == 'M' )
{
std::shared_ptr<komodo::event_notarized> ntz =
std::make_shared<komodo::event_notarized>(filedata, fpos, datalen, ht, func == 'M');
std::make_shared<komodo::event_notarized>(filedata, fpos, datalen, ht, dest, func == 'M');
komodo_eventadd_notarized(sp, symbol, ht, ntz);
}
else if ( func == 'U' ) // deprecated
Expand Down Expand Up @@ -292,8 +292,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
{
if ( sp != 0 )
{
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(height);
strncpy(evt->dest,dest,sizeof(evt->dest)-1);
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(height, dest);
evt->blockhash = sp->NOTARIZED_HASH;
evt->desttxid = sp->NOTARIZED_DESTTXID;
evt->notarizedheight = sp->NOTARIZED_HEIGHT;
Expand Down
8 changes: 6 additions & 2 deletions src/komodo_structs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ std::ostream& operator<<(std::ostream& os, const event_rewind& in)
return os;
}

event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_t height, bool includeMoM)
event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM)
: event(EVENT_NOTARIZED, height), MoMdepth(0)
{
strncpy(this->dest, _dest, sizeof(this->dest)-1);
this->dest[sizeof(this->dest)-1] = 0;
MoM.SetNull();
mem_read(this->notarizedheight, data, pos, data_len);
mem_read(this->blockhash, data, pos, data_len);
Expand All @@ -185,9 +187,11 @@ event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_
}
}

event_notarized::event_notarized(FILE* fp, int32_t height, bool includeMoM)
event_notarized::event_notarized(FILE* fp, int32_t height, const char* _dest, bool includeMoM)
: event(EVENT_NOTARIZED, height), MoMdepth(0)
{
strncpy(this->dest, _dest, sizeof(this->dest)-1);
this->dest[sizeof(this->dest)-1] = 0;
MoM.SetNull();
if ( fread(&notarizedheight,1,sizeof(notarizedheight),fp) != sizeof(notarizedheight) )
throw parse_error("Invalid notarization height");
Expand Down
12 changes: 8 additions & 4 deletions src/komodo_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ std::ostream& operator<<(std::ostream& os, const event_rewind& in);

struct event_notarized : public event
{
event_notarized() : event(komodo_event_type::EVENT_NOTARIZED, 0), notarizedheight(0), MoMdepth(0) {}
event_notarized(int32_t ht) : event(EVENT_NOTARIZED, ht), notarizedheight(0), MoMdepth(0) {}
event_notarized(uint8_t* data, long &pos, long data_len, int32_t height, bool includeMoM = false);
event_notarized(FILE* fp, int32_t ht, bool includeMoM = false);
event_notarized() : event(komodo_event_type::EVENT_NOTARIZED, 0), notarizedheight(0), MoMdepth(0) {
memset(this->dest, 0, sizeof(this->dest));
}
event_notarized(int32_t ht, const char* _dest) : event(EVENT_NOTARIZED, ht), notarizedheight(0), MoMdepth(0) {
strncpy(this->dest, _dest, sizeof(this->dest)-1); this->dest[sizeof(this->dest)-1] = 0;
}
event_notarized(uint8_t* data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM = false);
event_notarized(FILE* fp, int32_t ht, const char* _dest, bool includeMoM = false);
uint256 blockhash;
uint256 desttxid;
uint256 MoM;
Expand Down

0 comments on commit 8479430

Please sign in to comment.