Merge remote-tracking branch 'james/dev' into cryptoconditions

This commit is contained in:
Scott Sadler
2018-04-03 14:43:19 -03:00
4 changed files with 20 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ package=googlemock
$(package)_version=1.7.0 $(package)_version=1.7.0
$(package)_dependencies=googletest $(package)_dependencies=googletest
$(package)_download_path=https://github.com/google/$(package)/archive/ $(package)_download_path=https://github.com/google/$(package)/archive
$(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=release-$($(package)_version).tar.gz $(package)_download_file=release-$($(package)_version).tar.gz
$(package)_sha256_hash=3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232 $(package)_sha256_hash=3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232

View File

@@ -1,6 +1,6 @@
package=libsnark package=libsnark
$(package)_version=0.1 $(package)_version=0.1
$(package)_download_path=https://supernetorg.bintray.com/misc/ $(package)_download_path=https://supernetorg.bintray.com/misc
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz $(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$(package)-$($(package)_git_commit).tar.gz $(package)_download_file=$(package)-$($(package)_git_commit).tar.gz
$(package)_sha256_hash=47478adc2ae88c448dc736d59dfe007de6478e41e88d2d4d2ff4135a17ee6f90 $(package)_sha256_hash=47478adc2ae88c448dc736d59dfe007de6478e41e88d2d4d2ff4135a17ee6f90

View File

@@ -3,9 +3,9 @@ rust_packages := rust librustzcash
proton_packages := proton proton_packages := proton
zcash_packages := libgmp libsodium zcash_packages := libgmp libsodium
ifeq ($(host_os),linux) ifeq ($(host_os),linux)
packages := boost openssl libevent zeromq $(zcash_packages) googletest # googlemock packages := boost openssl libevent zeromq $(zcash_packages) googletest #googlemock
else else
packages := boost openssl libevent zeromq $(zcash_packages) libcurl googletest # googlemock packages := boost openssl libevent zeromq $(zcash_packages) libcurl googletest #googlemock
endif endif
native_packages := native_ccache native_packages := native_ccache

View File

@@ -612,7 +612,14 @@ int32_t komodo_is_notarytx(const CTransaction& tx)
int32_t komodo_block2height(CBlock *block) int32_t komodo_block2height(CBlock *block)
{ {
int32_t i,n,height = 0; uint8_t *ptr; static uint32_t match,mismatch;
int32_t i,n,height2=-1,height = 0; uint8_t *ptr; CBlockIndex *pindex;
if ( (pindex= mapBlockIndex[block->GetHash()]) != 0 )
{
height2 = (int32_t)pindex->nHeight;
if ( height2 >= 0 )
return(height2);
}
if ( block->vtx[0].vin.size() > 0 ) if ( block->vtx[0].vin.size() > 0 )
{ {
#ifdef KOMODO_ZCASH #ifdef KOMODO_ZCASH
@@ -635,6 +642,13 @@ int32_t komodo_block2height(CBlock *block)
} }
//komodo_init(height); //komodo_init(height);
} }
if ( height != height2 )
{
fprintf(stderr,"block2height height.%d vs height2.%d, match.%d mismatch.%d\n",height,height2,match,mismatch);
mismatch++;
if ( height2 >= 0 )
height = height2;
} else match++;
return(height); return(height);
} }
@@ -866,7 +880,7 @@ int32_t komodo_MoM(int32_t *notarized_heightp,uint256 *MoMp,uint256 *kmdtxidp,in
int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 hash) int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 hash)
{ {
int32_t notarized_height,MoMdepth; uint256 MoM,notarized_hash,notarized_desttxid; CBlockIndex *notary; CBlockIndex *pindex; int32_t notarized_height,MoMdepth; uint256 MoM,notarized_hash,notarized_desttxid; CBlockIndex *notary,*pindex;
if ( (pindex= chainActive.Tip()) == 0 ) if ( (pindex= chainActive.Tip()) == 0 )
return(-1); return(-1);
notarized_height = komodo_notarizeddata(pindex->nHeight,&notarized_hash,&notarized_desttxid); notarized_height = komodo_notarizeddata(pindex->nHeight,&notarized_hash,&notarized_desttxid);