jl777 8 years ago
parent
commit
2c90f16dd1
  1. 3
      iguana/iguana_notary.c
  2. 1
      iguana/main.c

3
iguana/iguana_notary.c

@ -700,11 +700,10 @@ int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct dpow_info *dp,struc
int32_t dpow_dsigs_match(struct dpow_entry notaries[DPOW_MAXRELAYS],int32_t numnotaries,struct dpow_sigentry *dsigs,int32_t num,int32_t refk,uint64_t refmask,int32_t refheight) int32_t dpow_dsigs_match(struct dpow_entry notaries[DPOW_MAXRELAYS],int32_t numnotaries,struct dpow_sigentry *dsigs,int32_t num,int32_t refk,uint64_t refmask,int32_t refheight)
{ {
struct dpow_sigentry dsig; int32_t i,senderind,matches = 0; struct dpow_sigentry dsig; int32_t i,senderind,matches = 0;
printf("dsigs_match\n");
for (i=0; i<num; i++) for (i=0; i<num; i++)
{ {
dpow_rwsigentry(0,(uint8_t *)&dsigs[i],&dsig); dpow_rwsigentry(0,(uint8_t *)&dsigs[i],&dsig);
if ( (senderind= dsig.senderind) < numnotaries && dsig.lastk == refk && dsig.mask == refmask ) if ( (senderind= dsig.senderind) < numnotaries && senderind >= 0 && dsig.lastk == refk && dsig.mask == refmask )
{ {
if ( (notaries[senderind].siglen= dsig.siglen) < sizeof(notaries[senderind].sig) ) if ( (notaries[senderind].siglen= dsig.siglen) < sizeof(notaries[senderind].sig) )
{ {

1
iguana/main.c

@ -1585,6 +1585,7 @@ void iguana_main(void *arg)
myinfo = SuperNET_MYINFO(0); myinfo = SuperNET_MYINFO(0);
libgfshare_init(myinfo,myinfo->logs,myinfo->exps); libgfshare_init(myinfo,myinfo->logs,myinfo->exps);
myinfo->rpcport = IGUANA_RPCPORT; myinfo->rpcport = IGUANA_RPCPORT;
myinfo->IAMNOTARY = 1;
if ( arg != 0 ) if ( arg != 0 )
{ {
if ( strcmp((char *)arg,"OStests") == 0 ) if ( strcmp((char *)arg,"OStests") == 0 )

Loading…
Cancel
Save