jl777 8 years ago
parent
commit
fd99b453f7
  1. 3
      iguana/dpow/dpow_fsm.c
  2. 5
      iguana/dpow/dpow_tx.c

3
iguana/dpow/dpow_fsm.c

@ -209,7 +209,8 @@ void dpow_statemachinestart(void *ptr)
destprevvout0 = jint(item,"destprevvout0");
srcprevtxid0 = jbits256(item,"srcprevtxid0");
srcprevvout0 = jint(item,"srcprevvout0");
bp->require0 = 1;
if ( bits256_nonz(destprevtxid0) != 0 && bits256_nonz(srcprevtxid0) != 0 )
bp->require0 = 1;
}
}
else

5
iguana/dpow/dpow_tx.c

@ -92,7 +92,7 @@ uint64_t dpow_ratifybest(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp)
{
*lastkp = k;
bestmask = mask | bp->require0;
printf("m.%d == minsigs.%d (%d %llx)\n",m,bp->minsigs,k,(long long)bestmask);
//printf("m.%d == minsigs.%d (%d %llx)\n",m,bp->minsigs,k,(long long)bestmask);
}
}
}
@ -348,6 +348,7 @@ cJSON *dpow_vins(struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uin
calc_rmd160_sha256(&script[3],ep->pubkey,33); // 8ee61a3161993f4f7b7081259bf5f3322d65d3f8
script[23] = 0x88;
script[24] = 0xac;
init_hexbytes_noT(scriptstr,script,25);
/*int32_t z;
for (z=0; z<25; z++)
printf("%02x",script[z]);
@ -358,8 +359,8 @@ cJSON *dpow_vins(struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uin
script[0] = 33;
memcpy(script+1,ep->pubkey,33);
script[34] = CHECKSIG;
init_hexbytes_noT(scriptstr,script,35);
}
init_hexbytes_noT(scriptstr,script,35);
jaddstr(item,"scriptPubKey",scriptstr);
jaddi(vins,item);
//printf("height.%d mod.%d VINI.%d <- i.%d j.%d\n",height,height % numnotaries,m,i,j);

Loading…
Cancel
Save