Browse Source

Test

etomic
jl777 8 years ago
parent
commit
b073930420
  1. 8
      basilisk/basilisk_swap.c
  2. 8
      iguana/iguana_interpreter.c

8
basilisk/basilisk_swap.c

@ -2871,11 +2871,7 @@ char *basilisk_swap_bobtxspend(char *name,struct supernet_info *myinfo,char *sym
height = coin->longestchain;
timestamp = (uint32_t)time(NULL);
V = calloc(256,sizeof(*V));
V[0].signers[0].privkey = privkey;
bitcoin_pubkey33(myinfo->ctx,V[0].signers[0].pubkey,privkey);
privkeys = cJSON_CreateArray();
bitcoin_priv2wif(wifstr,privkey,coin->chain->wiftype);
jaddistr(privkeys,wifstr);
if ( privkey2p != 0 )
{
V[0].signers[1].privkey = *privkey2p;
@ -2884,6 +2880,10 @@ char *basilisk_swap_bobtxspend(char *name,struct supernet_info *myinfo,char *sym
jaddistr(privkeys,wifstr);
V[0].N = V[0].M = 2;
} else V[0].N = V[0].M = 1;
V[0].signers[0].privkey = privkey;
bitcoin_pubkey33(myinfo->ctx,V[0].signers[0].pubkey,privkey);
bitcoin_priv2wif(wifstr,privkey,coin->chain->wiftype);
jaddistr(privkeys,wifstr);
V[0].suppress_pubkeys = suppress_pubkeys;
V[0].ignore_cltverr = ignore_cltverr;
if ( redeemlen != 0 )

8
iguana/iguana_interpreter.c

@ -785,7 +785,7 @@ int32_t iguana_checkmultisig(struct iguana_info *coin,struct iguana_interpreter
printf("iguana_checkmultisig n.%d != N.%d\n",n,N);
return(0);
}
printf("n.%d stackdepth.%d\n",n,stacks->stackdepth);
//printf("n.%d stackdepth.%d\n",n,stacks->stackdepth);
for (i=0; i<N; i++)
{
if ( stacks->stackdepth <= 0 )
@ -810,7 +810,7 @@ printf("n.%d stackdepth.%d\n",n,stacks->stackdepth);
if ( stacks->stackdepth <= 0 )
return(0);
m = (int32_t)iguana_num(iguana_pop(stacks));
printf("m.%d stackdepth.%d\n",m,stacks->stackdepth);
//printf("m.%d stackdepth.%d\n",m,stacks->stackdepth);
if ( m != M )
{
@ -830,7 +830,7 @@ printf("m.%d stackdepth.%d\n",m,stacks->stackdepth);
}
if ( i == numsigners )
{
char str[65]; printf("depth.%d sigtxid.(%s)\n",stacks->stackdepth,bits256_str(str,txhash2));
//char str[65]; printf("depth.%d sigtxid.(%s)\n",stacks->stackdepth,bits256_str(str,txhash2));
if ( stacks->stackdepth > 0 )
iguana_pop(stacks); // for backward compatibility
j = numsigners-1;
@ -849,7 +849,7 @@ printf("m.%d stackdepth.%d\n",m,stacks->stackdepth);
}
}
}
printf("valid.%d j.%d M.%d N.%d numsigners.%d\n",valid,j,M,N,numsigners);
printf("checkmultisig: valid.%d j.%d M.%d N.%d numsigners.%d\n",valid,j,M,N,numsigners);
return(0);
}

Loading…
Cancel
Save