Browse Source

Test

warmup
jl777 5 years ago
parent
commit
a9997c32bc
  1. 2
      src/cc/CCtx.cpp
  2. 22
      src/komodo_nSPV_superlite.h

2
src/cc/CCtx.cpp

@ -165,8 +165,6 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran
{
{
char addr[64];
Getscriptaddress(addr,vintx.vout[0].scriptPubKey);
fprintf(stderr,"vout[%d] %.8f -> %s\n",0,dstr(vintx.vout[0].nValue),addr);
Getscriptaddress(addr,vintx.vout[utxovout].scriptPubKey);
fprintf(stderr,"vout[%d] %.8f -> %s\n",utxovout,dstr(vintx.vout[utxovout].nValue),addr);
}

22
src/komodo_nSPV_superlite.h

@ -66,16 +66,32 @@ struct NSPV_ntzsresp *NSPV_ntzsresp_add(struct NSPV_ntzsresp *ptr)
struct NSPV_txproof *NSPV_txproof_find(uint256 txid)
{
int32_t i;
int32_t i; struct NSPV_txproof *backup = 0;
for (i=0; i<sizeof(NSPV_txproof_cache)/sizeof(*NSPV_txproof_cache); i++)
if ( NSPV_txproof_cache[i].txid == txid )
return(&NSPV_txproof_cache[i]);
return(0);
{
if ( NSPV_txproof_cache[i].txprooflen != 0 )
return(&NSPV_txproof_cache[i]);
else backup = &NSPV_txproof_cache[i];
}
return(backup);
}
struct NSPV_txproof *NSPV_txproof_add(struct NSPV_txproof *ptr)
{
int32_t i;
for (i=0; i<sizeof(NSPV_txproof_cache)/sizeof(*NSPV_txproof_cache); i++)
if ( NSPV_txproof_cache[i].txid == txid )
{
if ( NSPV_txproof_cache[i].txprooflen == 0 && ptr->txprooflen != 0 )
{
NSPV_txproof_purge(&NSPV_txproof_cache[i]);
NSPV_txproof_copy(&NSPV_txproof_cache[i],ptr);
return;
}
else if ( NSPV_txproof_cache[i].txprooflen != 0 || ptr->txprooflen == 0 )
return;
}
for (i=0; i<sizeof(NSPV_txproof_cache)/sizeof(*NSPV_txproof_cache); i++)
if ( NSPV_txproof_cache[i].txlen == 0 )
break;

Loading…
Cancel
Save