]> Git Repo - VerusCoin.git/commitdiff
Merge branch 'beta' into dev
authorjl777 <[email protected]>
Tue, 17 Apr 2018 20:58:53 +0000 (23:58 +0300)
committerGitHub <[email protected]>
Tue, 17 Apr 2018 20:58:53 +0000 (23:58 +0300)
1  2 
src/komodo.h
src/komodo_bitcoind.h
src/komodo_globals.h
src/komodo_notary.h
src/komodo_pax.h
src/main.cpp
src/rpcblockchain.cpp
src/rpcclient.cpp

diff --cc src/komodo.h
index 3bde3e02941cca800c68ce7159d49425c2742454,859e3db9d828aed3e023d967d7d8745faec2f10e..11e2194bbd3bb83336eb37b92092f056e6942aac
@@@ -807,13 -727,9 +808,13 @@@ void komodo_connectblock(CBlockIndex *p
      else
      {
          if ( pindex->nHeight != hwmheight )
 +        {
              printf("%s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight);
 +            komodo_purge_ccdata((int32_t)pindex->nHeight);
 +            hwmheight = pindex->nHeight;
 +        }
          komodo_event_rewind(sp,symbol,pindex->nHeight);
-         komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0,zero,0);
+         komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0);//,zero,0);
      }
      komodo_currentheight_set(chainActive.Tip()->nHeight);
      if ( pindex != 0 )
index b82be68a630ca4f074802cce4c2ef84a0616bd81,3d569577f4f4ab32d0754dedca39ca9fcb1f18fd..6fa1a5718025e5f5db88d41993c446384634e4c4
@@@ -887,8 -873,7 +887,6 @@@ int32_t komodo_is_special(uint8_t pubke
              }
              if ( blocktime != 0 && blocktimes[1] != 0 && blocktime < blocktimes[1]+57 )
              {
-                 //if ( height > 790000 )
-                 //    fprintf(stderr,"lag.%d ht.%d n.%d blocktimes[%u vs %u %u]\n",blocktime-blocktimes[1],height,notaryid,blocktime,blocktimes[0],blocktimes[1]);
 -                //fprintf(stderr,"lag.%d ht.%d n.%d blocktimes[%u vs %u %u]\n",blocktime-blocktimes[1],height,notaryid,blocktime,blocktimes[0],blocktimes[1]);
                  if ( height > 807000 )
                      return(-2);
              }
index ff15c17c8f6482c682593d809c4d64f77713123f,8a2f87918792db25270b59d0c7e626f64671a534..3b4e62aa2a71d22b6ac22d5a01a792415b1ed020
@@@ -15,9 -15,8 +15,9 @@@
  
  #include "komodo_defs.h"
  
 +void komodo_prefetch(FILE *fp);
  uint32_t komodo_heightstamp(int32_t height);
- void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t kheight,uint32_t ktime,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout,uint256 MoM,int32_t MoMdepth);
+ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t kheight,uint32_t ktime,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout);
  void komodo_init(int32_t height);
  int32_t komodo_MoMdata(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t nHeight,uint256 *MoMoMp,int32_t *MoMoMoffsetp,int32_t *MoMoMdepthp,int32_t *kmdstartip,int32_t *kmdendip);
  int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp);
index c2c8d09ef626215d9a99237e2571d17c584ad329,127a56329ed8bd5e24c972b2f05e39decbe5a654..0ae7838ed50624d0ad846763f3a827c91e8650fd
@@@ -434,9 -435,8 +435,8 @@@ int32_t komodo_MoMdata(int32_t *notariz
      memset(MoMoMp,0,sizeof(*MoMoMp));
      memset(kmdtxidp,0,sizeof(*kmdtxidp));
      return(0);
 -}*/
 +}
  
  int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp)
  {
      struct notarized_checkpoint *np = 0; int32_t i=0,flag = 0; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp;
@@@ -540,6 -540,40 +540,6 @@@ void komodo_init(int32_t height
          //for (i=0; i<sizeof(Minerids); i++)
          //    Minerids[i] = -2;
          didinit = 1;
-         komodo_stateupdate(0,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,zero,0);
+         komodo_stateupdate(0,0,0,0,zero,0,0,0,0,0,0,0,0,0,0);
      }
 - }
 -
 -/*void komodo_assetchain_pubkeys(char *jsonstr)
 -{
 -    cJSON *array; int32_t i,n; uint8_t pubkeys[64][33]; char *hexstr;
 -    memset(pubkeys,0,sizeof(pubkeys));
 -    if ( (array= cJSON_Parse(jsonstr)) != 0 )
 -    {
 -        if ( (n= cJSON_GetArraySize(array)) > 0 )
 -        {
 -            for (i=0; i<n; i++)
 -            {
 -                if ( (hexstr= jstri(array,i)) != 0 && is_hexstr(hexstr,0) == 66 )
 -                {
 -                    decode_hex(pubkeys[i],33,hexstr);
 -                    fprintf(stderr,"i.%d of n.%d pubkey.(%s)\n",i,n,hexstr);
 -                }
 -                else
 -                {
 -                    fprintf(stderr,"illegal hexstr.(%s) i.%d of n.%d\n",hexstr,i,n);
 -                    break;
 -                }
 -            }
 -            if ( i == n )
 -            {
 -                komodo_init(-1);
 -                komodo_notarysinit(0,pubkeys,n);
 -                KOMODO_EXTERNAL_NOTARIES = 1;
 -                //printf("initialize pubkeys[%d]\n",n);
 -            } else fprintf(stderr,"komodo_assetchain_pubkeys i.%d vs n.%d\n",i,n);
 -        } else fprintf(stderr,"assetchain pubkeys n.%d\n",n);
 -    }
 -    //else if ( jsonstr != 0 )
 -    //    fprintf(stderr,"assetchain pubkeys couldnt parse.(%s)\n",jsonstr);
 -}*/
 +}
Simple merge
diff --cc src/main.cpp
Simple merge
Simple merge
index f2c6ae6e255e4c3679aea0c2bf8f2e756ab0c2eb,799dca34f39a5f3f39a0b2932556470a6976c4c7..5b3f0c9eb9656a7e3e219ddef6847885141e35f8
@@@ -134,10 -125,8 +134,10 @@@ static const CRPCConvertParam vRPCConve
      { "paxprices", 3 },
      { "paxpending", 0 },
      { "notaries", 2 },
 -    //{ "height_MoM", 1 },
 -    //{ "txMoMproof", 1 },
 +    { "height_MoM", 1 },
-     //{ "MoMoMdata", 3 },
++    { "MoMoMdata", 3 },
 +    { "allMoMs", 2 },
 +    { "txMoMproof", 1 },
      { "minerids", 1 },
      { "kvsearch", 1 },
      { "kvupdate", 4 },
This page took 0.049484 seconds and 4 git commands to generate.