From 177dfea05574de10346d1888a83a02e8fa706392 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 25 Nov 2016 10:10:56 -0300 Subject: [PATCH] test --- iguana/dPoW.h | 2 +- iguana/dpow/dpow_network.c | 2 +- iguana/iguana_notary.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 3e495af86..8ca6c5a5b 100755 --- a/iguana/dPoW.h +++ b/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 diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index ad4aa26cd..a5e7c29b0 100755 --- a/iguana/dpow/dpow_network.c +++ b/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); diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index a5a21944e..a7c7a6d93 100755 --- a/iguana/iguana_notary.c +++ b/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);