]> Git Repo - VerusCoin.git/commitdiff
fix...
authorjl777 <[email protected]>
Thu, 12 Apr 2018 13:45:10 +0000 (16:45 +0300)
committerjl777 <[email protected]>
Thu, 12 Apr 2018 13:45:10 +0000 (16:45 +0300)
src/komodo.h
src/komodo_ccdata.h
src/komodo_structs.h
src/rpcblockchain.cpp

index 52daaae0e696bf9e2c91f63c84b5f81100283b80..33ef5c19f0447ce93fb60777ddcb496e7ed4560e 100644 (file)
@@ -654,7 +654,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
                                     MoMoMdata.pairs = (struct komodo_ccdatapair *)calloc(MoMoMdata.numpairs,sizeof(*MoMoMdata.pairs));
                                     for (k=0; k<MoMoMdata.numpairs; k++)
                                     {
-                                        len += iguana_rwnum(0,&scriptbuf[len],sizeof(int32_t),(uint8_t *)&MoMoMdata.pairs[k].notarization_height);
+                                        len += iguana_rwnum(0,&scriptbuf[len],sizeof(int32_t),(uint8_t *)&MoMoMdata.pairs[k].notarized_height);
                                         len += iguana_rwnum(0,&scriptbuf[len],sizeof(uint32_t),(uint8_t *)&MoMoMdata.pairs[k].MoMoMoffset);
                                         MoMoMdata.len += sizeof(uint32_t) * 2;
                                     }
index f6b8eb6b378c2f5c7fb1575af5f949d2169d10ee..a2267e6de5b81ba320633a5153d921edee1533c1 100644 (file)
@@ -59,7 +59,7 @@ int32_t komodo_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM
     {
         if ( ccdata->MoMdata.height < kmdheight )
         {
-            fprintf(stderr,"%s notarized.%d kmd.%d\n",ccdata->symbol,ccdata->MoMdata.notarization_height,ccdata->MoMdata.height);
+            fprintf(stderr,"%s notarized.%d kmd.%d\n",ccdata->symbol,ccdata->MoMdata.notarized_height,ccdata->MoMdata.height);
             if ( strcmp(ccdata->symbol,symbol) == 0 )
             {
                 if ( endi == 0 )
@@ -67,13 +67,13 @@ int32_t komodo_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM
                     len += iguana_rwnum(1,&hexdata[len],sizeof(ccdata->CCid),(uint8_t *)&ccdata->CCid);
                     endi = ccdata->MoMdata.height;
                 }
-                if ( (mdata->numpairs == 1 && notarized_height == 0) || ccdata->MoMdata.notarization_height <= notarized_height )
+                if ( (mdata->numpairs == 1 && notarized_height == 0) || ccdata->MoMdata.notarized_height <= notarized_height )
                 {
                     starti = ccdata->MoMdata.height + 1;
                     break;
                 }
                 item = cJSON_CreateArray();
-                jaddinum(item,ccdata->MoMdata.notarization_height);
+                jaddinum(item,ccdata->MoMdata.notarized_height);
                 jaddinum(item,offset);
                 jaddi(pairs,item);
                 mdata->numpairs++;
@@ -99,7 +99,7 @@ int32_t komodo_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM
             MoMoM = iguana_merkle(tree,offset);
             jaddbits256(retjson,(char *)"MoMoM",MoMoM);
             jaddnum(retjson,(char *)"MoMoMdepth",offset);
-            if ( mdata->numpairs > 0 && mdata.numpairs == cJSON_GetArraySize(pairs) )
+            if ( mdata->numpairs > 0 && mdata->numpairs == cJSON_GetArraySize(pairs) )
             {
                 len += iguana_rwnum(1,&hexdata[len],sizeof(uint32_t),(uint8_t *)&mdata->kmdstarti);
                 len += iguana_rwnum(1,&hexdata[len],sizeof(uint32_t),(uint8_t *)&mdata->kmdendi);
@@ -115,9 +115,9 @@ int32_t komodo_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM
                         break;
                     }
                     item = jitem(pairs,i);
-                    mdata->pairs[i].notarization_height = juint(0,jitem(item,0));
-                    mdata->pairs[i].MoMoMoffset = juint(0,jitem(item,1));
-                    len += iguana_rwnum(1,&hexdata[len],sizeof(uint32_t),(uint8_t *)&mdata->pairs[i].notarization_height);
+                    mdata->pairs[i].notarized_height = juint(jitem(item,0),0);
+                    mdata->pairs[i].MoMoMoffset = juint(jitem(item,1),0);
+                    len += iguana_rwnum(1,&hexdata[len],sizeof(uint32_t),(uint8_t *)&mdata->pairs[i].notarized_height);
                     len += iguana_rwnum(1,&hexdata[len],sizeof(uint32_t),(uint8_t *)&mdata->pairs[i].MoMoMoffset);
                 }
                 if ( i == mdata->numpairs && len*2+1 < hexsize )
@@ -150,7 +150,7 @@ int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccd
         CC_firstheight = ccdata->MoMdata.height;
     for (i=0; i<32; i++)
         hash.bytes[i] = ((uint8_t *)&ccdata->MoMdata.MoM)[31-i];
-    fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->MoMdata.notarization_height,hash.ToString().c_str(),ccdata->MoMdata.height,ccdata->MoMdata.txi);
+    fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->MoMdata.notarized_height,hash.ToString().c_str(),ccdata->MoMdata.height,ccdata->MoMdata.txi);
     if ( ASSETCHAINS_SYMBOL[0] == 0 )
     {
         if ( CC_data != 0 && (CC_data->MoMdata.height > ccdata->MoMdata.height || (CC_data->MoMdata.height == ccdata->MoMdata.height && CC_data->MoMdata.txi >= ccdata->MoMdata.txi)) )
@@ -172,7 +172,7 @@ int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccd
         {
             for (i=0; i<MoMoMdata->numpairs; i++)
             {
-                if ( (np= komodo_npptr(MoMoMdata->pairs[i].notarization_height)) != 0 )
+                if ( (np= komodo_npptr(MoMoMdata->pairs[i].notarized_height)) != 0 )
                 {
                     memset(&zero,0,sizeof(zero));
                     if ( memcmp(&np->MoMoM,&zero,sizeof(np->MoMoM)) == 0 )
index 23f8752e895e73ff566506e2635b47ad9e160cf0..df9cd2154352a9ba85e1c2edde6cce00674fb65b 100644 (file)
@@ -95,7 +95,7 @@ struct komodo_ccdataMoM
     int32_t MoMdepth,notarized_height,height,txi;
 };
 
-struct komodo_ccdatapair { int32_t notarization_height; uint32_t MoMoMoffset; };
+struct komodo_ccdatapair { int32_t notarized_height; uint32_t MoMoMoffset; };
 
 struct komodo_ccdataMoMoM
 {
index a003b2c7a11a22bdd58e3bd9b50cd3093df3bf86..37fbe755e15f376ae9e975d76ec101ef61fe20e4 100644 (file)
@@ -615,7 +615,7 @@ UniValue MoMoMdata(const UniValue& params, bool fHelp)
             for (i=0; i<mdata.numpairs; i++)
             {
                 UniValue item(UniValue::VARR);
-                item.push_back(mdata.pairs[i].notarization_height);
+                item.push_back(mdata.pairs[i].notarized_height);
                 item.push_back(mdata.pairs[i].MoMoMoffset);
                 a.push_back(item);
             }
This page took 0.035339 seconds and 4 git commands to generate.