|
|
@ -108,20 +108,18 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ( &tx != 0 && n >= 0 && n < (int32_t)tx.vout.size() ) |
|
|
|
if ( !tx.IsNull() && n >= 0 && n < (int32_t)tx.vout.size() ) |
|
|
|
{ |
|
|
|
ptr = (uint8_t *)tx.vout[n].scriptPubKey.data(); |
|
|
|
m = tx.vout[n].scriptPubKey.size(); |
|
|
|
|
|
|
|
for (i=0; i<maxsize&&i<m; i++) { |
|
|
|
//fprintf(stderr,"%02x",ptr[i]);
|
|
|
|
scriptPubKey[i] = ptr[i]; |
|
|
|
} |
|
|
|
//fprintf(stderr,"\n");
|
|
|
|
} |
|
|
|
fprintf(stderr,"got scriptPubKey[%d] via rawtransaction ht.%d %s\n",m,height,txid.GetHex().c_str()); |
|
|
|
return(i); |
|
|
|
} |
|
|
|
else if ( &tx != 0 ) |
|
|
|
else if ( !tx.IsNull() ) |
|
|
|
fprintf(stderr,"gettxout_scriptPubKey ht.%d n.%d > voutsize.%d\n",height,n,(int32_t)tx.vout.size()); |
|
|
|
|
|
|
|
return(-1); |
|
|
@ -776,7 +774,7 @@ int32_t komodo_init() |
|
|
|
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str()); |
|
|
|
if ( GetBoolArg("-txindex", DEFAULT_TXINDEX) == 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"txindex is off, import notary pubkeys\n"); |
|
|
|
//fprintf(stderr,"txindex is off, import notary pubkeys\n");
|
|
|
|
KOMODO_NEEDPUBKEYS = 1; |
|
|
|
KOMODO_TXINDEX = 0; |
|
|
|
} |
|
|
|