diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index f5604ce44..3b31cd07d 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -2401,7 +2401,7 @@ int64_t iguana_ramchainopen(char *fname,struct iguana_info *coin,struct iguana_r ramchain->H.scriptoffset = 1; _iguana_ramchain_setptrs(RAMCHAIN_PTRS,ramchain->H.data); iguana_ramchain_extras(coin,ramchain,hashmem,0); - printf("%s ramchaininit %p\n",coin->symbol,ramchain->H.data); + printf("%s ramchaininit %p ramchain.%p\n",coin->symbol,ramchain->H.data,ramchain); } if ( rdata != 0 ) return(rdata->allocsize); diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index 6801b2e4f..a16e34b6f 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -93,8 +93,8 @@ void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_b } if ( coin->RTramchain.H.data == 0 ) { - printf("ALLOC RTramchain.(%s)\n",fname); iguana_ramchainopen(fname,coin,dest,&coin->RTmem,&coin->RThashmem,bp->bundleheight,bp->hashes[0]); + printf("ALLOC RTramchain.(%s) RTrdata %p rdata.%p\n",fname,coin->RTramchain.H.data,bp->ramchain.H.data); dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti; dest->externalind = dest->H.stacksize = 0; dest->H.scriptoffset = 1; diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index 12463aeea..0ad9a0924 100755 --- a/iguana/iguana_tx.c +++ b/iguana/iguana_tx.c @@ -222,10 +222,12 @@ int32_t iguana_ramtxbytes(struct iguana_info *coin,uint8_t *serialized,int32_t m int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int32_t max,struct iguana_peer *addr,bits256 hash2,int32_t validatesigs) { - struct iguana_txid *tx,T; bits256 checktxid; int32_t i,len,total,bundlei=-2; struct iguana_block *block; struct iguana_msgblock msgB; bits256 *tree,checkhash2,merkle_root; struct iguana_bundle *bp=0; long tmp; char str[65]; + struct iguana_txid *tx,T; bits256 checktxid; int32_t i,len,total,bundlei=-2; struct iguana_block *block; struct iguana_msgblock msgB; bits256 *tree,checkhash2,merkle_root; struct iguana_bundle *bp=0; long tmp; char str[65]; struct iguana_ramchaindata *rdata; if ( (bp= iguana_bundlefind(coin,&bp,&bundlei,hash2)) != 0 && bundlei >= 0 && bundlei < bp->n ) { - if ( (block= bp->blocks[bundlei]) != 0 && bp->ramchain.H.data != 0 ) + if ( (rdata= bp->ramchain.H.data) == 0 && bp == coin->current ) + rdata = coin->RTramchain.H.data; + if ( (block= bp->blocks[bundlei]) != 0 && rdata != 0 ) { iguana_blockunconv(coin->chain->zcash,coin->chain->auxpow,&msgB,block,0); msgB.txn_count = block->RO.txn_count; @@ -319,7 +321,7 @@ int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int if ( coin->virtualchain != 0 ) ; if ( block != 0 ) - printf("iguana_peerblockrequest: block.%p ht.%d mainchain.%d [%d:%d] from %s bp.%p rdata.%p\n",block,block->height,block->mainchain,bp->hdrsi,bundlei,addr!=0?addr->ipaddr:"local",bp,bp!=0?bp->ramchain.H.data:0); + printf("iguana_peerblockrequest: block.%p ht.%d mainchain.%d [%d:%d] from %s bp.%p rdata.%p\n",block,block->height,block->mainchain,bp->hdrsi,bundlei,addr!=0?addr->ipaddr:"local",bp,bp!=0?rdata:0); else printf("iguana_peerblockrequest: block.%p [%d:%d]\n",block,bp->hdrsi,bundlei); } } //else printf("iguana_peerblockrequest: cant find %s\n",bits256_str(str,hash2));