Skip to content

Commit 8479430

Browse files
authored
Merge pull request #33 from DeckerSU/static-dev
0.7.1-beta2: static-dev -> static
2 parents d8dbd47 + a1c8fec commit 8479430

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 7)
55
define(_CLIENT_VERSION_REVISION, 1)
6-
define(_CLIENT_VERSION_BUILD, 0)
6+
define(_CLIENT_VERSION_BUILD, 1)
77
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)))
88
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)))
99
define(_CLIENT_VERSION_IS_RELEASE, true)

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#define CLIENT_VERSION_MAJOR 0
3434
#define CLIENT_VERSION_MINOR 7
3535
#define CLIENT_VERSION_REVISION 1
36-
#define CLIENT_VERSION_BUILD 0
36+
#define CLIENT_VERSION_BUILD 1
3737

3838
//! Set to true for release, false for prerelease or test build
3939
#define CLIENT_VERSION_IS_RELEASE true

src/komodo.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char
6565
}
6666
else if ( func == 'N' || func == 'M' )
6767
{
68-
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(fp, ht, func == 'M');
68+
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(fp, ht, dest, func == 'M');
6969
komodo_eventadd_notarized(sp, symbol, ht, evt);
7070
}
7171
else if ( func == 'U' ) // deprecated
@@ -134,7 +134,7 @@ int32_t komodo_parsestatefiledata(struct komodo_state *sp,uint8_t *filedata,long
134134
else if ( func == 'N' || func == 'M' )
135135
{
136136
std::shared_ptr<komodo::event_notarized> ntz =
137-
std::make_shared<komodo::event_notarized>(filedata, fpos, datalen, ht, func == 'M');
137+
std::make_shared<komodo::event_notarized>(filedata, fpos, datalen, ht, dest, func == 'M');
138138
komodo_eventadd_notarized(sp, symbol, ht, ntz);
139139
}
140140
else if ( func == 'U' ) // deprecated
@@ -292,8 +292,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
292292
{
293293
if ( sp != 0 )
294294
{
295-
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(height);
296-
strncpy(evt->dest,dest,sizeof(evt->dest)-1);
295+
std::shared_ptr<komodo::event_notarized> evt = std::make_shared<komodo::event_notarized>(height, dest);
297296
evt->blockhash = sp->NOTARIZED_HASH;
298297
evt->desttxid = sp->NOTARIZED_DESTTXID;
299298
evt->notarizedheight = sp->NOTARIZED_HEIGHT;

src/komodo_structs.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ std::ostream& operator<<(std::ostream& os, const event_rewind& in)
171171
return os;
172172
}
173173

174-
event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_t height, bool includeMoM)
174+
event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM)
175175
: event(EVENT_NOTARIZED, height), MoMdepth(0)
176176
{
177+
strncpy(this->dest, _dest, sizeof(this->dest)-1);
178+
this->dest[sizeof(this->dest)-1] = 0;
177179
MoM.SetNull();
178180
mem_read(this->notarizedheight, data, pos, data_len);
179181
mem_read(this->blockhash, data, pos, data_len);
@@ -185,9 +187,11 @@ event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_
185187
}
186188
}
187189

188-
event_notarized::event_notarized(FILE* fp, int32_t height, bool includeMoM)
190+
event_notarized::event_notarized(FILE* fp, int32_t height, const char* _dest, bool includeMoM)
189191
: event(EVENT_NOTARIZED, height), MoMdepth(0)
190192
{
193+
strncpy(this->dest, _dest, sizeof(this->dest)-1);
194+
this->dest[sizeof(this->dest)-1] = 0;
191195
MoM.SetNull();
192196
if ( fread(&notarizedheight,1,sizeof(notarizedheight),fp) != sizeof(notarizedheight) )
193197
throw parse_error("Invalid notarization height");

src/komodo_structs.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,14 @@ std::ostream& operator<<(std::ostream& os, const event_rewind& in);
117117

118118
struct event_notarized : public event
119119
{
120-
event_notarized() : event(komodo_event_type::EVENT_NOTARIZED, 0), notarizedheight(0), MoMdepth(0) {}
121-
event_notarized(int32_t ht) : event(EVENT_NOTARIZED, ht), notarizedheight(0), MoMdepth(0) {}
122-
event_notarized(uint8_t* data, long &pos, long data_len, int32_t height, bool includeMoM = false);
123-
event_notarized(FILE* fp, int32_t ht, bool includeMoM = false);
120+
event_notarized() : event(komodo_event_type::EVENT_NOTARIZED, 0), notarizedheight(0), MoMdepth(0) {
121+
memset(this->dest, 0, sizeof(this->dest));
122+
}
123+
event_notarized(int32_t ht, const char* _dest) : event(EVENT_NOTARIZED, ht), notarizedheight(0), MoMdepth(0) {
124+
strncpy(this->dest, _dest, sizeof(this->dest)-1); this->dest[sizeof(this->dest)-1] = 0;
125+
}
126+
event_notarized(uint8_t* data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM = false);
127+
event_notarized(FILE* fp, int32_t ht, const char* _dest, bool includeMoM = false);
124128
uint256 blockhash;
125129
uint256 desttxid;
126130
uint256 MoM;

0 commit comments

Comments
 (0)