Browse Source

test

acspeed
jl777 8 years ago
parent
commit
177dfea055
  1. 2
      iguana/dPoW.h
  2. 2
      iguana/dpow/dpow_network.c
  3. 2
      iguana/iguana_notary.c

2
iguana/dPoW.h

@ -19,7 +19,7 @@
#define DPOW_FIRSTRATIFY 1000
#define DPOW_CHECKPOINTFREQ 10
#define DPOW_MINSIGS 2
#define DPOW_MINSIGS ((height < 90000) ? 7 : 13)
//#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1)
#define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries)
#define DPOW_VERSION 0x0767

2
iguana/dpow/dpow_network.c

@ -560,7 +560,7 @@ void dpow_nanomsg_update(struct supernet_info *myinfo)
dpow_ipbitsadd(myinfo,dp,np->ipbits,np->numipbits,np->senderind,np->myipbits);
if ( (bp= dpow_heightfind(myinfo,dp,np->height)) != 0 && bp->state != 0xffffffff )
{
if ( np->senderind >= 0 && np->senderind < bp->numnotaries && memcmp(bp-> notaries[np->senderind].pubkey+1,np->srchash.bytes,32) == 0 )
if ( np->senderind >= 0 && np->senderind < bp->numnotaries && memcmp(bp-> notaries[np->senderind].pubkey+1,np->srchash.bytes,32) == 0 && bits256_nonz(np->srchash) != 0 )
{
if ( bp->isratify == 0 )
dpow_nanoutxoget(myinfo,dp,bp,&np->notarize,0,np->senderind);

2
iguana/iguana_notary.c

@ -72,7 +72,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
{
freq = 1;
minsigs = (komodo_notaries(dp->symbol,pubkeys,height) >> 1) + 1;
if ( minsigs > DPOW_MINSIGS )
if ( minsigs < DPOW_MINSIGS )
minsigs = DPOW_MINSIGS;
}
printf("%s/%s src ht.%d dest.%u nonz.%d %s minsigs.%d\n",dp->symbol,dp->dest,checkpoint.blockhash.height,dp->destupdated,bits256_nonz(checkpoint.blockhash.hash),bits256_str(str,dp->last.blockhash.hash),minsigs);

Loading…
Cancel
Save