signedmasks for asset chains

This commit is contained in:
jl777
2018-01-02 13:23:58 +07:00
parent cb84dc08ee
commit dfd450dff9

View File

@@ -546,12 +546,10 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
len += 4; len += 4;
if ( ASSETCHAINS_SYMBOL[0] != 0 ) if ( ASSETCHAINS_SYMBOL[0] != 0 )
printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len); printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len);
if ( ASSETCHAINS_SYMBOL[0] == 0 )
{
if ( signedfp == 0 ) if ( signedfp == 0 )
{ {
char fname[512]; char fname[512];
komodo_statefname(fname,(char *)"",(char *)"signedmasks"); komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"signedmasks");
if ( (signedfp= fopen(fname,"rb+")) == 0 ) if ( (signedfp= fopen(fname,"rb+")) == 0 )
signedfp = fopen(fname,"wb"); signedfp = fopen(fname,"wb");
else fseek(signedfp,0,SEEK_END); else fseek(signedfp,0,SEEK_END);
@@ -562,6 +560,8 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
fwrite(&signedmask,1,sizeof(signedmask),signedfp); fwrite(&signedmask,1,sizeof(signedmask),signedfp);
fflush(signedfp); fflush(signedfp);
} }
if ( ASSETCHAINS_SYMBOL[0] == 0 )
{
if ( opretlen > len && scriptbuf[len] == 'A' ) if ( opretlen > len && scriptbuf[len] == 'A' )
{ {
//for (i=0; i<opretlen-len; i++) //for (i=0; i<opretlen-len; i++)