This commit is contained in:
jl777
2016-10-25 12:46:59 -03:00
parent 7637aa7fb7
commit d9e9d8da10
2 changed files with 5 additions and 5 deletions

View File

@@ -282,7 +282,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
len = block.vtx[i].vout[j].scriptPubKey.size();
if ( len <= sizeof(scriptbuf) )
{
memcpy(scriptbuf,block.vtx[i].vout[j].scriptPubKey.data(),len);
memcpy(scriptbuf,&block.vtx[i].vout[j].scriptPubKey,len);
notaryid = komodo_voutupdate(notaryid,scriptbuf,len,height,txhash,i,j,&voutmask,&specialtx,&notarizedheight);
if ( 0 && i > 0 )
{
@@ -318,7 +318,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
len = block.vtx[i].vout[j].scriptPubKey.size();
if ( len <= sizeof(scriptbuf) )
{
memcpy(scriptbuf,block.vtx[i].vout[j].scriptPubKey.data(),len);
memcpy(scriptbuf,&block.vtx[i].vout[j].scriptPubKey,len);
if ( len == 35 && scriptbuf[0] == 33 && scriptbuf[34] == 0xac )
{
memcpy(pubkeys[numvalid++],scriptbuf+1,33);

View File

@@ -130,7 +130,7 @@ void komodo_disconnect(CBlockIndex *pindex,CBlock& block)
int32_t komodo_block2height(CBlock *block)
{
int32_t i,n,height = 0; uint8_t *ptr = (uint8_t *)block->vtx[0].vin[0].scriptSig.data();
int32_t i,n,height = 0; uint8_t *ptr = (uint8_t *)&block->vtx[0].vin[0].scriptSig;
komodo_init();
if ( block->vtx[0].vin[0].scriptSig.size() > 5 )
{
@@ -150,7 +150,7 @@ int32_t komodo_block2height(CBlock *block)
void komodo_block2pubkey33(uint8_t *pubkey33,CBlock& block)
{
uint8_t *ptr = (uint8_t *)block.vtx[0].vout[0].scriptPubKey.data();
uint8_t *ptr = (uint8_t *)&block.vtx[0].vout[0].scriptPubKey;
komodo_init();
memcpy(pubkey33,ptr+1,33);
}
@@ -164,7 +164,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
{
if ( ReadBlockFromDisk(block,(const CBlockIndex *)pindex,
#ifndef KOMODO_ZCASH
Params().GetConsensus(),
Params().GetConsensus()
#endif
) != 0 )
{