jl777 8 years ago
parent
commit
fc6295b391
  1. 7
      basilisk/basilisk_swap.c

7
basilisk/basilisk_swap.c

@ -230,7 +230,7 @@ int32_t basilisk_rawtx_sign(struct supernet_info *myinfo,int32_t height,struct b
V[0].suppress_pubkeys = dest->suppress_pubkeys;
if ( dest->redeemlen != 0 )
memcpy(V[0].p2shscript,dest->redeemscript,dest->redeemlen), V[0].p2shlen = dest->redeemlen;
txobj = bitcoin_txcreate(rawtx->coin->chain->isPoS,locktime,userdata == 0 ? 1 : 4);//rawtx->coin->chain->locktime_txversion);
txobj = bitcoin_txcreate(rawtx->coin->chain->isPoS,locktime,userdata == 0 ? 1 : 1);//rawtx->coin->chain->locktime_txversion);
vins = cJSON_CreateArray();
item = cJSON_CreateObject();
if ( userdata != 0 && userdatalen > 0 )
@ -239,6 +239,7 @@ int32_t basilisk_rawtx_sign(struct supernet_info *myinfo,int32_t height,struct b
V[0].userdatalen = userdatalen;
init_hexbytes_noT(hexstr,userdata,userdatalen);
jaddstr(item,"userdata",hexstr);
jaddnum(item,"sequence",0);
}
if ( bits256_nonz(rawtx->actualtxid) != 0 )
jaddbits256(item,"txid",rawtx->actualtxid);
@ -249,8 +250,8 @@ int32_t basilisk_rawtx_sign(struct supernet_info *myinfo,int32_t height,struct b
jaddstr(sobj,"hex",hexstr);
jadd(item,"scriptPubKey",sobj);
jaddnum(item,"suppress",dest->suppress_pubkeys);
if ( locktime != 0 )
jaddnum(item,"sequence",0);
//if ( locktime != 0 )
// jaddnum(item,"sequence",0);
if ( (dest->redeemlen= rawtx->redeemlen) != 0 )
{
init_hexbytes_noT(hexstr,rawtx->redeemscript,rawtx->redeemlen);

Loading…
Cancel
Save