jl777 9 years ago
parent
commit
ebf86cb1f1
  1. 2
      .gitignore
  2. 1
      crypto777/jpeg/unix/jmemname.c
  3. 2
      iguana/coins/genbtcd
  4. 297
      iguana/iguana.vcxproj
  5. 146
      iguana/iguana.vcxproj.filters
  6. 2
      iguana/iguana_blocks.c
  7. 74
      iguana/iguana_peers.c
  8. 48
      iguana/iguana_realtime.c
  9. 73
      iguana/iguana_recv.c
  10. BIN
      iguana/pthreadVC2.lib
  11. BIN
      iguana/pthreadvc2.dll

2
.gitignore

@ -34,4 +34,6 @@ agents/*
iguana/confs/BTC_hdrs.txt
deprecated/.DS_Store
.DS_Store

1
crypto777/jpeg/unix/jmemname.c

@ -11,7 +11,6 @@
* Also, the problem of determining the amount of memory available
* is shoved onto the user.
*/
#ifndef WIN32
#include <unistd.h>
#endif

2
iguana/coins/genbtcd

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":11,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":512,\"endpend\":512,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632,\"minconfirms\":5}"
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":11,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":512,\"endpend\":512,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632,\"minconfirms\":5}"

297
iguana/iguana.vcxproj

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{80F58B93-D1FC-4FC4-A880-1F40A1FC851B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ConsoleApplication3</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>iguana</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level2</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StructMemberAlignment>1Byte</StructMemberAlignment>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StructMemberAlignment>1Byte</StructMemberAlignment>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StructMemberAlignment>1Byte</StructMemberAlignment>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\basilisk\basilisk.h" />
<ClInclude Include="..\crypto777\jpeg\cderror.h" />
<ClInclude Include="..\crypto777\jpeg\cdjpeg.h" />
<ClInclude Include="..\crypto777\jpeg\jconfig.h" />
<ClInclude Include="..\crypto777\jpeg\jdct.h" />
<ClInclude Include="..\crypto777\jpeg\jerror.h" />
<ClInclude Include="..\crypto777\jpeg\jinclude.h" />
<ClInclude Include="..\crypto777\jpeg\jmemsys.h" />
<ClInclude Include="..\crypto777\jpeg\jmorecfg.h" />
<ClInclude Include="..\crypto777\jpeg\jpegint.h" />
<ClInclude Include="..\crypto777\jpeg\jpeglib.h" />
<ClInclude Include="..\crypto777\jpeg\jversion.h" />
<ClInclude Include="..\crypto777\jpeg\transupp.h" />
<ClInclude Include="..\crypto777\OS_portable.h" />
<ClInclude Include="..\datachain\datachain.h" />
<ClInclude Include="..\gecko\gecko.h" />
<ClInclude Include="..\iguana\exchanges777.h" />
<ClInclude Include="..\iguana\iguana777.h" />
<ClInclude Include="..\iguana\mini-gmp.h" />
<ClInclude Include="..\includes\iguana_defines.h" />
<ClInclude Include="..\includes\iguana_funcs.h" />
<ClInclude Include="..\includes\iguana_structs.h" />
<ClInclude Include="..\OSlibs\win\mingw.h" />
<ClInclude Include="..\OSlibs\win\mman.h" />
<ClInclude Include="..\OSlibs\win\pthread.h" />
<ClInclude Include="..\targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\basilisk\basilisk.c" />
<ClCompile Include="..\crypto777\bitcoind_RPC.c" />
<ClCompile Include="..\crypto777\cJSON.c" />
<ClCompile Include="..\crypto777\curve25519-donna.c" />
<ClCompile Include="..\crypto777\curve25519.c" />
<ClCompile Include="..\crypto777\hmac_sha512.c" />
<ClCompile Include="..\crypto777\iguana_OS.c" />
<ClCompile Include="..\crypto777\iguana_serdes.c" />
<ClCompile Include="..\crypto777\iguana_utils.c" />
<ClCompile Include="..\crypto777\inet.c" />
<ClCompile Include="..\crypto777\jpeg\jaricom.c" />
<ClCompile Include="..\crypto777\jpeg\jcapimin.c" />
<ClCompile Include="..\crypto777\jpeg\jcapistd.c" />
<ClCompile Include="..\crypto777\jpeg\jcarith.c" />
<ClCompile Include="..\crypto777\jpeg\jccoefct.c" />
<ClCompile Include="..\crypto777\jpeg\jccolor.c" />
<ClCompile Include="..\crypto777\jpeg\jcdctmgr.c" />
<ClCompile Include="..\crypto777\jpeg\jchuff.c" />
<ClCompile Include="..\crypto777\jpeg\jcinit.c" />
<ClCompile Include="..\crypto777\jpeg\jcmainct.c" />
<ClCompile Include="..\crypto777\jpeg\jcmarker.c" />
<ClCompile Include="..\crypto777\jpeg\jcmaster.c" />
<ClCompile Include="..\crypto777\jpeg\jcomapi.c" />
<ClCompile Include="..\crypto777\jpeg\jcparam.c" />
<ClCompile Include="..\crypto777\jpeg\jcprepct.c" />
<ClCompile Include="..\crypto777\jpeg\jcsample.c" />
<ClCompile Include="..\crypto777\jpeg\jctrans.c" />
<ClCompile Include="..\crypto777\jpeg\jdapimin.c" />
<ClCompile Include="..\crypto777\jpeg\jdapistd.c" />
<ClCompile Include="..\crypto777\jpeg\jdarith.c" />
<ClCompile Include="..\crypto777\jpeg\jdatadst.c" />
<ClCompile Include="..\crypto777\jpeg\jdatasrc.c" />
<ClCompile Include="..\crypto777\jpeg\jdcoefct.c" />
<ClCompile Include="..\crypto777\jpeg\jdcolor.c" />
<ClCompile Include="..\crypto777\jpeg\jddctmgr.c" />
<ClCompile Include="..\crypto777\jpeg\jdhuff.c" />
<ClCompile Include="..\crypto777\jpeg\jdinput.c" />
<ClCompile Include="..\crypto777\jpeg\jdmainct.c" />
<ClCompile Include="..\crypto777\jpeg\jdmarker.c" />
<ClCompile Include="..\crypto777\jpeg\jdmaster.c" />
<ClCompile Include="..\crypto777\jpeg\jdmerge.c" />
<ClCompile Include="..\crypto777\jpeg\jdpostct.c" />
<ClCompile Include="..\crypto777\jpeg\jdsample.c" />
<ClCompile Include="..\crypto777\jpeg\jdtrans.c" />
<ClCompile Include="..\crypto777\jpeg\jerror.c" />
<ClCompile Include="..\crypto777\jpeg\jfdctflt.c" />
<ClCompile Include="..\crypto777\jpeg\jfdctfst.c" />
<ClCompile Include="..\crypto777\jpeg\jfdctint.c" />
<ClCompile Include="..\crypto777\jpeg\jidctflt.c" />
<ClCompile Include="..\crypto777\jpeg\jidctfst.c" />
<ClCompile Include="..\crypto777\jpeg\jidctint.c" />
<ClCompile Include="..\crypto777\jpeg\jmemmgr.c" />
<ClCompile Include="..\crypto777\jpeg\jquant1.c" />
<ClCompile Include="..\crypto777\jpeg\jquant2.c" />
<ClCompile Include="..\crypto777\jpeg\jutils.c" />
<ClCompile Include="..\crypto777\jpeg\unix\jmemname.c" />
<ClCompile Include="..\crypto777\OS_nonportable.c" />
<ClCompile Include="..\crypto777\OS_portable.c" />
<ClCompile Include="..\crypto777\OS_time.c" />
<ClCompile Include="..\crypto777\ramcoder.c" />
<ClCompile Include="..\crypto777\SaM.c" />
<ClCompile Include="..\crypto777\scrypt.c" />
<ClCompile Include="..\crypto777\tweetnacl.c" />
<ClCompile Include="..\datachain\datachain.c" />
<ClCompile Include="..\gecko\gecko.c" />
<ClCompile Include="..\iguana\iguana777.c" />
<ClCompile Include="..\iguana\iguana_accept.c" />
<ClCompile Include="..\iguana\iguana_bitmap.c" />
<ClCompile Include="..\iguana\iguana_blocks.c" />
<ClCompile Include="..\iguana\iguana_bundles.c" />
<ClCompile Include="..\iguana\iguana_chains.c" />
<ClCompile Include="..\iguana\iguana_exchanges.c" />
<ClCompile Include="..\iguana\iguana_init.c" />
<ClCompile Include="..\iguana\iguana_interpreter.c" />
<ClCompile Include="..\iguana\iguana_json.c" />
<ClCompile Include="..\iguana\iguana_mofn.c" />
<ClCompile Include="..\iguana\iguana_msg.c" />
<ClCompile Include="..\iguana\iguana_passport.c" />
<ClCompile Include="..\iguana\iguana_payments.c" />
<ClCompile Include="..\iguana\iguana_peers.c" />
<ClCompile Include="..\iguana\iguana_ramchain.c" />
<ClCompile Include="..\iguana\iguana_realtime.c" />
<ClCompile Include="..\iguana\iguana_recv.c" />
<ClCompile Include="..\iguana\iguana_rpc.c" />
<ClCompile Include="..\iguana\iguana_scripts.c" />
<ClCompile Include="..\iguana\iguana_secp.c" />
<ClCompile Include="..\iguana\iguana_sign.c" />
<ClCompile Include="..\iguana\iguana_spendvectors.c" />
<ClCompile Include="..\iguana\iguana_stake.c" />
<ClCompile Include="..\iguana\iguana_tradebots.c" />
<ClCompile Include="..\iguana\iguana_tx.c" />
<ClCompile Include="..\iguana\iguana_txidfind.c" />
<ClCompile Include="..\iguana\iguana_unspents.c" />
<ClCompile Include="..\iguana\iguana_volatiles.c" />
<ClCompile Include="..\iguana\iguana_wallet.c" />
<ClCompile Include="..\iguana\main.c" />
<ClCompile Include="..\iguana\mini-gmp.c" />
<ClCompile Include="..\iguana\ramchain_api.c" />
<ClCompile Include="..\iguana\secp256k1\src\secp256k1.c" />
<ClCompile Include="..\iguana\SuperNET_keys.c" />
<ClCompile Include="..\OSlibs\win\mingw.c" />
</ItemGroup>
<ItemGroup>
<Library Include="pthreadVC2.lib" />
<Library Include="..\OSlibs\win\libpthreadGC2.a" />
<Library Include="..\OSlibs\win\libpthreadGC2_64.a" />
</ItemGroup>
<ItemGroup>
<None Include="pthreadvc2.dll" />
<None Include="ucrtbased.dll" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

146
iguana/iguana.vcxproj.filters

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="basilisk\basilisk.c" />
<ClCompile Include="crypto777\bitcoind_RPC.c" />
<ClCompile Include="crypto777\cJSON.c" />
<ClCompile Include="crypto777\curve25519-donna.c" />
<ClCompile Include="crypto777\curve25519.c" />
<ClCompile Include="crypto777\hmac_sha512.c" />
<ClCompile Include="crypto777\iguana_OS.c" />
<ClCompile Include="crypto777\iguana_serdes.c" />
<ClCompile Include="crypto777\iguana_utils.c" />
<ClCompile Include="crypto777\inet.c" />
<ClCompile Include="crypto777\jpeg\jaricom.c" />
<ClCompile Include="crypto777\jpeg\jcapimin.c" />
<ClCompile Include="crypto777\jpeg\jcapistd.c" />
<ClCompile Include="crypto777\jpeg\jcarith.c" />
<ClCompile Include="crypto777\jpeg\jccoefct.c" />
<ClCompile Include="crypto777\jpeg\jccolor.c" />
<ClCompile Include="crypto777\jpeg\jcdctmgr.c" />
<ClCompile Include="crypto777\jpeg\jchuff.c" />
<ClCompile Include="crypto777\jpeg\jcinit.c" />
<ClCompile Include="crypto777\jpeg\jcmainct.c" />
<ClCompile Include="crypto777\jpeg\jcmarker.c" />
<ClCompile Include="crypto777\jpeg\jcmaster.c" />
<ClCompile Include="crypto777\jpeg\jcomapi.c" />
<ClCompile Include="crypto777\jpeg\jcparam.c" />
<ClCompile Include="crypto777\jpeg\jcprepct.c" />
<ClCompile Include="crypto777\jpeg\jcsample.c" />
<ClCompile Include="crypto777\jpeg\jctrans.c" />
<ClCompile Include="crypto777\jpeg\jdapimin.c" />
<ClCompile Include="crypto777\jpeg\jdapistd.c" />
<ClCompile Include="crypto777\jpeg\jdarith.c" />
<ClCompile Include="crypto777\jpeg\jdatadst.c" />
<ClCompile Include="crypto777\jpeg\jdatasrc.c" />
<ClCompile Include="crypto777\jpeg\jdcoefct.c" />
<ClCompile Include="crypto777\jpeg\jdcolor.c" />
<ClCompile Include="crypto777\jpeg\jddctmgr.c" />
<ClCompile Include="crypto777\jpeg\jdhuff.c" />
<ClCompile Include="crypto777\jpeg\jdinput.c" />
<ClCompile Include="crypto777\jpeg\jdmainct.c" />
<ClCompile Include="crypto777\jpeg\jdmarker.c" />
<ClCompile Include="crypto777\jpeg\jdmaster.c" />
<ClCompile Include="crypto777\jpeg\jdmerge.c" />
<ClCompile Include="crypto777\jpeg\jdpostct.c" />
<ClCompile Include="crypto777\jpeg\jdsample.c" />
<ClCompile Include="crypto777\jpeg\jdtrans.c" />
<ClCompile Include="crypto777\jpeg\jerror.c" />
<ClCompile Include="crypto777\jpeg\jfdctflt.c" />
<ClCompile Include="crypto777\jpeg\jfdctfst.c" />
<ClCompile Include="crypto777\jpeg\jfdctint.c" />
<ClCompile Include="crypto777\jpeg\jidctflt.c" />
<ClCompile Include="crypto777\jpeg\jidctfst.c" />
<ClCompile Include="crypto777\jpeg\jidctint.c" />
<ClCompile Include="crypto777\jpeg\jmemmgr.c" />
<ClCompile Include="crypto777\jpeg\jquant1.c" />
<ClCompile Include="crypto777\jpeg\jquant2.c" />
<ClCompile Include="crypto777\jpeg\jutils.c" />
<ClCompile Include="crypto777\jpeg\unix\jmemname.c" />
<ClCompile Include="crypto777\OS_nonportable.c" />
<ClCompile Include="crypto777\OS_portable.c" />
<ClCompile Include="crypto777\OS_time.c" />
<ClCompile Include="crypto777\ramcoder.c" />
<ClCompile Include="crypto777\SaM.c" />
<ClCompile Include="crypto777\scrypt.c" />
<ClCompile Include="crypto777\tweetnacl.c" />
<ClCompile Include="datachain\datachain.c" />
<ClCompile Include="gecko\gecko.c" />
<ClCompile Include="iguana\iguana777.c" />
<ClCompile Include="iguana\iguana_accept.c" />
<ClCompile Include="iguana\iguana_bitmap.c" />
<ClCompile Include="iguana\iguana_blocks.c" />
<ClCompile Include="iguana\iguana_bundles.c" />
<ClCompile Include="iguana\iguana_chains.c" />
<ClCompile Include="iguana\iguana_exchanges.c" />
<ClCompile Include="iguana\iguana_init.c" />
<ClCompile Include="iguana\iguana_interpreter.c" />
<ClCompile Include="iguana\iguana_json.c" />
<ClCompile Include="iguana\iguana_mofn.c" />
<ClCompile Include="iguana\iguana_msg.c" />
<ClCompile Include="iguana\iguana_passport.c" />
<ClCompile Include="iguana\iguana_payments.c" />
<ClCompile Include="iguana\iguana_peers.c" />
<ClCompile Include="iguana\iguana_ramchain.c" />
<ClCompile Include="iguana\iguana_realtime.c" />
<ClCompile Include="iguana\iguana_recv.c" />
<ClCompile Include="iguana\iguana_rpc.c" />
<ClCompile Include="iguana\iguana_scripts.c" />
<ClCompile Include="iguana\iguana_secp.c" />
<ClCompile Include="iguana\iguana_sign.c" />
<ClCompile Include="iguana\iguana_spendvectors.c" />
<ClCompile Include="iguana\iguana_stake.c" />
<ClCompile Include="iguana\iguana_tradebots.c" />
<ClCompile Include="iguana\iguana_tx.c" />
<ClCompile Include="iguana\iguana_txidfind.c" />
<ClCompile Include="iguana\iguana_unspents.c" />
<ClCompile Include="iguana\iguana_volatiles.c" />
<ClCompile Include="iguana\iguana_wallet.c" />
<ClCompile Include="iguana\main.c" />
<ClCompile Include="iguana\mini-gmp.c" />
<ClCompile Include="iguana\ramchain_api.c" />
<ClCompile Include="iguana\secp256k1\src\secp256k1.c" />
<ClCompile Include="iguana\SuperNET_keys.c" />
<ClCompile Include="OSlibs\win\mingw.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="basilisk\basilisk.h" />
<ClInclude Include="crypto777\jpeg\cderror.h" />
<ClInclude Include="crypto777\jpeg\cdjpeg.h" />
<ClInclude Include="crypto777\jpeg\jconfig.h" />
<ClInclude Include="crypto777\jpeg\jdct.h" />
<ClInclude Include="crypto777\jpeg\jerror.h" />
<ClInclude Include="crypto777\jpeg\jinclude.h" />
<ClInclude Include="crypto777\jpeg\jmemsys.h" />
<ClInclude Include="crypto777\jpeg\jmorecfg.h" />
<ClInclude Include="crypto777\jpeg\jpegint.h" />
<ClInclude Include="crypto777\jpeg\jpeglib.h" />
<ClInclude Include="crypto777\jpeg\jversion.h" />
<ClInclude Include="crypto777\jpeg\transupp.h" />
<ClInclude Include="crypto777\OS_portable.h" />
<ClInclude Include="datachain\datachain.h" />
<ClInclude Include="gecko\gecko.h" />
<ClInclude Include="iguana\exchanges777.h" />
<ClInclude Include="iguana\iguana777.h" />
<ClInclude Include="iguana\mini-gmp.h" />
<ClInclude Include="includes\iguana_defines.h" />
<ClInclude Include="includes\iguana_funcs.h" />
<ClInclude Include="includes\iguana_structs.h" />
<ClInclude Include="OSlibs\win\mingw.h" />
<ClInclude Include="OSlibs\win\mman.h" />
<ClInclude Include="OSlibs\win\pthread.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<Library Include="pthreadVC2.lib" />
<Library Include="OSlibs\win\libpthreadGC2.a" />
<Library Include="OSlibs\win\libpthreadGC2_64.a" />
</ItemGroup>
<ItemGroup>
<None Include="pthreadvc2.dll" />
<None Include="ucrtbased.dll" />
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
</Project>

2
iguana/iguana_blocks.c

@ -566,6 +566,8 @@ struct iguana_block *_iguana_chainlink(struct supernet_info *myinfo,struct iguan
{
int32_t valid,bundlei,height=-1; struct iguana_block *hwmchain,*block = 0,*prev=0;
bits256 *hash2p=0; double prevPoW = 0.;
if ( coin->blocks.hwmchain.height < 0 )
iguana_genesis(myinfo,coin,coin->chain);
if ( newblock == 0 || newblock->RO.timestamp == 0 || bits256_nonz(newblock->RO.prev_block) == 0 )
return(0);
iguana_blocksizecheck("chainlink new",coin->chain->zcash,newblock);

74
iguana/iguana_peers.c

@ -367,14 +367,14 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
}
saddr.sin_family = AF_INET;
saddr.sin_port = htons(port);
//#ifdef WIN32
// saddr.sin_addr.s_addr = (uint32_t)calc_ipbits("127.0.0.1");
//#else
//#ifdef WIN32
// saddr.sin_addr.s_addr = (uint32_t)calc_ipbits("127.0.0.1");
//#else
memcpy(&saddr.sin_addr.s_addr,hostent->h_addr_list[0],hostent->h_length);
expand_ipbits(checkipaddr,saddr.sin_addr.s_addr);
if ( strcmp(ipaddr,checkipaddr) != 0 )
printf("bindflag.%d iguana_socket mismatch (%s) -> (%s)?\n",bindflag,checkipaddr,ipaddr);
//#endif
//#endif
if ( (sock= socket(AF_INET,SOCK_STREAM,0)) < 0 )
{
if ( errno != ETIMEDOUT )
@ -434,7 +434,7 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
}
sleep(13);
//continue;
}
}
if ( errno != ECONNRESET && errno != ENOTCONN && errno != ECONNREFUSED && errno != ETIMEDOUT && errno != EHOSTUNREACH )
{
printf("%s(%s) port.%d failed: %s sock.%d. errno.%d\n",bindflag!=0?"bind":"connect",hostname,port,strerror(errno),sock,errno);
@ -508,27 +508,27 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s
if ( (numsent= (int32_t)send(usock,serialized,remains,MSG_NOSIGNAL)) < 0 )
#endif
{
if ( errno == EAGAIN || errno == EWOULDBLOCK )
{
//addr->persistent_peer = 1;
sleep(1);
continue;
}
//if ( errno != EAGAIN && errno != EWOULDBLOCK )
{
printf("%s: %s numsent.%d vs remains.%d len.%d errno.%d (%s) usock.%d\n",serialized+4,addr->ipaddr,numsent,remains,len,errno,strerror(errno),addr->usock);
printf("bad errno.%d %s zombify.%p\n",errno,strerror(errno),&addr->dead);
addr->dead = (uint32_t)time(NULL);
return(-errno);
}
if ( errno == EAGAIN || errno == EWOULDBLOCK )
{
//addr->persistent_peer = 1;
sleep(1);
continue;
}
else if ( remains > 0 )
//if ( errno != EAGAIN && errno != EWOULDBLOCK )
{
remains -= numsent;
serialized += numsent;
if ( remains > 0 )
printf("%s iguana sent.%d remains.%d of len.%d\n",addr->ipaddr,numsent,remains,len);
printf("%s: %s numsent.%d vs remains.%d len.%d errno.%d (%s) usock.%d\n",serialized+4,addr->ipaddr,numsent,remains,len,errno,strerror(errno),addr->usock);
printf("bad errno.%d %s zombify.%p\n",errno,strerror(errno),&addr->dead);
addr->dead = (uint32_t)time(NULL);
return(-errno);
}
}
else if ( remains > 0 )
{
remains -= numsent;
serialized += numsent;
if ( remains > 0 )
printf("%s iguana sent.%d remains.%d of len.%d\n",addr->ipaddr,numsent,remains,len);
}
}
addr->totalsent += len;
if ( 0 && addr->basilisk != 0 )
@ -691,7 +691,7 @@ void _iguana_processmsg(struct supernet_info *myinfo,struct iguana_info *coin,in
}
//addr->dead = 1;
}
// printf("%s recv error on hdr errno.%d (%s) -> zombify\n",addr->ipaddr,-recvlen,strerror(-recvlen));
// printf("%s recv error on hdr errno.%d (%s) -> zombify\n",addr->ipaddr,-recvlen,strerror(-recvlen));
#ifndef IGUANA_DEDICATED_THREADS
addr->dead = 1;
#endif
@ -892,7 +892,7 @@ void *iguana_iAddriterator(struct iguana_info *coin,struct iguana_iAddr *iA,stru
//else printf("connector null iA\n");
return(0);
}
uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
{
char checkaddr[64],_ipaddr[64]; uint64_t ipbits; uint32_t now = (uint32_t)time(NULL); int32_t i,n; struct iguana_iAddr *iA; struct iguana_peer *addr;
@ -905,7 +905,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
for (i=n=0; i<IGUANA_MAXPEERS; i++)
if ( strcmp(ipaddr,coin->peers->active[i].ipaddr) == 0 )
{
//printf("%s possible peer.(%s) %x already there\n",coin->symbol,ipaddr,(uint32_t)coin->peers->active[i].ipbits);
printf("%s possible peer.(%s) %x already there\n",coin->symbol,ipaddr,(uint32_t)coin->peers->active[i].ipbits);
return(0);
}
//printf("%s Q possible.(%s)\n",coin->symbol,ipaddr);
@ -927,12 +927,12 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
if ( (addr= iguana_peerslot(coin,(uint32_t)ipbits,0)) == 0 )
return((uint32_t)time(NULL));
/*for (i=n=0; i<IGUANA_MAXPEERS; i++)
{
if ( strcmp(ipaddr,coin->peers->active[i].ipaddr) == 0 )
return((uint32_t)time(NULL));
else if ( coin->peers->active[i].ipaddr[0] != 0 )
n++;
}*/
{
if ( strcmp(ipaddr,coin->peers->active[i].ipaddr) == 0 )
return((uint32_t)time(NULL));
else if ( coin->peers->active[i].ipaddr[0] != 0 )
n++;
}*/
n = coin->peers->numranked;
if ( n >= coin->MAXPEERS-(coin->MAXPEERS>>3)-1 || coin->peers->numranked >= coin->MAXPEERS )
return((uint32_t)time(NULL));
@ -1202,7 +1202,7 @@ void iguana_dedicatedloop(struct supernet_info *myinfo,struct iguana_info *coin,
iguana_memreset(mem[i]);
}
#endif
//addr->pubkey = GENESIS_PUBKEY;
//addr->pubkey = GENESIS_PUBKEY;
ipbits = (uint32_t)addr->ipbits;
vcalc_sha256(0,addr->iphash.bytes,(uint8_t *)&ipbits,sizeof(ipbits));
//char str[65]; printf("start dedicatedloop.%s addrind.%d %s\n",addr->ipaddr,addr->addrind,bits256_str(str,addr->iphash));
@ -1292,10 +1292,10 @@ void iguana_dedicatedloop(struct supernet_info *myinfo,struct iguana_info *coin,
if ( flag != 0 )
run = 0;
/*else if ( 0 && addr->supernet != 0 && time(NULL) > lastping+SUPERNET_PINGGAP )
{
iguana_send_supernet(addr,SUPERNET_GETPEERSTR,0);
lastping = (uint32_t)time(NULL);
}*/
{
iguana_send_supernet(addr,SUPERNET_GETPEERSTR,0);
lastping = (uint32_t)time(NULL);
}*/
if ( addr->persistent_peer != 0 )
{
if ( addr->usock < 0 || addr->dead != 0 )

48
iguana/iguana_realtime.c

@ -767,12 +767,12 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
}
iguana_RTbalance_verify("start iterate",coin);
/*if ( strcmp(coin->symbol,"BTC") != 0 && strcmp(coin->symbol,"LTC") != 0 )
{
if ( block->height < coin->firstRTheight+coin->minconfirms )
return;
if ( (block= iguana_blockfind("RTnew",coin,iguana_blockhash(coin,block->height-coin->minconfirms))) == 0 )
return;
}*/
{
if ( block->height < coin->firstRTheight+coin->minconfirms )
return;
if ( (block= iguana_blockfind("RTnew",coin,iguana_blockhash(coin,block->height-coin->minconfirms))) == 0 )
return;
}*/
if ( block->height < coin->firstRTheight || block->height >= coin->firstRTheight+sizeof(coin->RTblocks)/sizeof(*coin->RTblocks) )
{
if ( 0 && coin->firstRTheight > 0 )
@ -842,24 +842,24 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
char str[65]; printf("reorg RTheight.%d vs block.%d %s\n",coin->RTheight,block->height,bits256_str(str,block->RO.hash2));
iguana_RTreset(coin);
/*while ( coin->RTheight > block->height )
{
if ( iguana_RTblocksub(myinfo,coin,iguana_RTblock(coin,coin->RTheight-1)) < 0 )
{
printf("error subtracting %d\n",coin->RTheight-1);
coin->lastRTheight = coin->RTheight-1;
portable_mutex_unlock(&coin->RTmutex);
return;
}
coin->RTheight--;
}
if ( iguana_RTblockadd(myinfo,coin,block) < 0 )
{
printf("error adding %d\n",block->height);
portable_mutex_unlock(&coin->RTmutex);
return;
}
coin->lastRTheight = block->height;
coin->RTheight = coin->lastRTheight+1;*/
{
if ( iguana_RTblocksub(myinfo,coin,iguana_RTblock(coin,coin->RTheight-1)) < 0 )
{
printf("error subtracting %d\n",coin->RTheight-1);
coin->lastRTheight = coin->RTheight-1;
portable_mutex_unlock(&coin->RTmutex);
return;
}
coin->RTheight--;
}
if ( iguana_RTblockadd(myinfo,coin,block) < 0 )
{
printf("error adding %d\n",block->height);
portable_mutex_unlock(&coin->RTmutex);
return;
}
coin->lastRTheight = block->height;
coin->RTheight = coin->lastRTheight+1;*/
}
portable_mutex_unlock(&coin->RTmutex);
}

73
iguana/iguana_recv.c

@ -93,10 +93,10 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
if ( block->mainchain != 0 && block->valid != 0 && block->txvalid != 0 )
{
/*if ( (bp= coin->bundles[block->bundlei]) != 0 )
{
bp->hashes[block->bundlei] = block->RO.hash2;
bp->blocks[block->bundlei] = block;
}*/
{
bp->hashes[block->bundlei] = block->RO.hash2;
bp->blocks[block->bundlei] = block;
}*/
return(0);
}
}
@ -194,7 +194,7 @@ struct iguana_txblock *iguana_peertxdata(struct iguana_info *coin,int32_t *bundl
int32_t bundlei,datalen,checki,hdrsi,fpos; char str[65],str2[65]; FILE *fp;
bits256 checkhash2; struct iguana_txblock *txdata = 0; static const bits256 zero;
if ( (bundlei= iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,ipbits,hash2,zero,1)) >= 0 )
//if ( (bundlei= iguana_peerfname(coin,&hdrsi,fname,ipbits,hash2)) >= 0 )
//if ( (bundlei= iguana_peerfname(coin,&hdrsi,fname,ipbits,hash2)) >= 0 )
{
if ( (fp= fopen(fname,"rb")) != 0 )
{
@ -500,7 +500,7 @@ void iguana_oldgotblockM(struct supernet_info *myinfo,struct iguana_info *coin,s
txdata->zblock.fpos = 0;
req->datalen = txdata->datalen;
req->ipbits = txdata->zblock.fpipbits;
} //else printf("cant save block\n");
} //else printf("cant save block\n");
}
if ( txdata->zblock.fpos == 0 )
{
@ -526,7 +526,7 @@ void iguana_oldgotblockM(struct supernet_info *myinfo,struct iguana_info *coin,s
}
req->addr = addr;
//if ( (bits256_cmp(origtxdata->zblock.RO.hash2,coin->blocks.hwmchain.RO.hash2) == 0 || req->zblock.mainchain == 0 || req->zblock.valid == 0 || req->zblock.txvalid == 0) && iguana_RTrawdata(coin,origtxdata->zblock.RO.hash2,0,&len,&numtx,1) == 0 )
queue_enqueue("recvQ",&coin->recvQ,&req->DL,0);
queue_enqueue("recvQ",&coin->recvQ,&req->DL,0);
if ( 0 && strcmp("BTCD",coin->symbol) == 0 )
printf("%s Q.(%s)\n",coin->symbol,bits256_str(str,origtxdata->zblock.RO.hash2));
} else printf("nonz fpos.%d %s\n",txdata->zblock.fpos,bits256_str(str,origtxdata->zblock.RO.hash2));
@ -887,7 +887,6 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
{
req = iguana_recv_bundlereq(coin,addr,0,H,data,recvlen,0,-1,origtxdata);
queue_enqueue("recvQ",&coin->recvQ,&req->DL,0);
//printf("nonz fpos.%d %s\n",txdata->zblock.fpos,bits256_str(str,origtxdata->zblock.RO.hash2));
}
}
@ -993,7 +992,7 @@ void iguana_gotblockhashesM(struct iguana_info *coin,struct iguana_peer *addr,bi
if ( 0 && coin->RTheight > 0 )
{
for (i=1; i<num; i++)
iguana_sendblockreqPT(coin,0,0,-1,blockhashes[i],0);
iguana_sendblockreqPT(coin,0,0,-1,blockhashes[i],0);
}
}
}
@ -1258,7 +1257,7 @@ struct iguana_bundle *iguana_bundleset(struct supernet_info *myinfo,struct iguan
else //if ( coin->RTheight > 0 && newheight == coin->RTheight )
{
//printf("newheight.%d is RTheight\n",newheight);
}
}
}
//if ( 0 && bits256_nonz(prevhash2) > 0 )
// iguana_patch(coin,block);
@ -1407,13 +1406,13 @@ struct iguana_bundlereq *iguana_recvblockhdrs(struct supernet_info *myinfo,struc
if ( 0 && bp == coin->current )
printf("i.%d n.%d match.%d blockhdrs.%s hdrsi.%d\n",i,n,match,bits256_str(str,zblocks[0].RO.hash2),firstbp!=0?firstbp->hdrsi:-1);
/*if ( firstbp != 0 && match >= coin->chain->bundlesize-1 )
{
if ( firstbp->queued == 0 )
{
//fprintf(stderr,"firstbp blockQ %d\n",firstbp->bundleheight);
iguana_bundleQ(myinfo,coin,firstbp,1000);
}
}*/
{
if ( firstbp->queued == 0 )
{
//fprintf(stderr,"firstbp blockQ %d\n",firstbp->bundleheight);
iguana_bundleQ(myinfo,coin,firstbp,1000);
}
}*/
if ( firstbp != 0 && (addr= req->addr) != 0 && n >= coin->chain->bundlesize )
{
addr->RThashes[0] = firstbp->hashes[0];
@ -1583,13 +1582,13 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct supernet_info *myinfo,str
//printf("set block->blockhashes[%d]\n",num);
}
/*if ( (addr= coin->peers->ranked[0]) != 0 )
{
if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,&blockhashes[1],1)) > 0 )
{
iguana_send(coin,addr,serialized,len);
//char str[65]; printf("REQ.%s\n",bits256_str(str,blockhashes[1]));
}
}*/
{
if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,&blockhashes[1],1)) > 0 )
{
iguana_send(coin,addr,serialized,len);
//char str[65]; printf("REQ.%s\n",bits256_str(str,blockhashes[1]));
}
}*/
iguana_blockQ("hdr1",coin,0,-1,blockhashes[1],1);
}
else
@ -1698,7 +1697,7 @@ struct iguana_bundlereq *iguana_recvblock(struct supernet_info *myinfo,struct ig
if ( (tmpblock= bp->blocks[i]) != 0 && tmpblock->fpipbits != 0 && tmpblock->fpos >= 0 && ((bp->hdrsi == 0 && i == 0) || bits256_nonz(tmpblock->RO.prev_block) != 0) )
numsaved++;
}
// fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d mainchain.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req!=0?req->copyflag:-1,block->mainchain);
// fprintf(stderr,"%s [%d:%d] block.%x | s.%d r.%d copy.%d mainchain.%d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block!=0?block->fpipbits:0,numsaved,numrecv,req!=0?req->copyflag:-1,block->mainchain);
if ( _iguana_chainlink(myinfo,coin,block) == 0 )
{
next = block;
@ -1794,11 +1793,11 @@ int32_t iguana_reqblocks(struct supernet_info *myinfo,struct iguana_info *coin)
if ( (bp= coin->bundles[hdrsi]) != 0 )
{
/*for (bundlei=0; bundlei<coin->chain->bundlesize; bundlei++)
if ( (block= bp->blocks[bundlei]) != 0 && bits256_cmp(block->RO.hash2,bp->hashes[bundlei]) != 0 && bits256_nonz(bp->hashes[bundlei]) != 0 )
{
char str[65]; printf("%s [%d] bundlei.%d ht.%d vs expected %d\n",bits256_str(str,bp->hashes[bundlei]),hdrsi,bundlei,block->height,bp->bundleheight+bundlei);
bp->blocks[bundlei] = iguana_blockfind("fixit",coin,bp->hashes[bundlei]);
}*/
if ( (block= bp->blocks[bundlei]) != 0 && bits256_cmp(block->RO.hash2,bp->hashes[bundlei]) != 0 && bits256_nonz(bp->hashes[bundlei]) != 0 )
{
char str[65]; printf("%s [%d] bundlei.%d ht.%d vs expected %d\n",bits256_str(str,bp->hashes[bundlei]),hdrsi,bundlei,block->height,bp->bundleheight+bundlei);
bp->blocks[bundlei] = iguana_blockfind("fixit",coin,bp->hashes[bundlei]);
}*/
bundlei = (coin->blocks.hwmchain.height+1) % coin->chain->bundlesize;
if ( (next= bp->blocks[bundlei]) != 0 || (next= iguana_blockfind("reqblocks",coin,bp->hashes[bundlei])) != 0 )
{
@ -1962,10 +1961,10 @@ int32_t iguana_processrecvQ(struct supernet_info *myinfo,struct iguana_info *coi
myfree(req->hashes,(req->n+1) * sizeof(*req->hashes)), req->hashes = 0;
}
/*else if ( req->type == 'Q' ) // quotes from inv
{
if ( (req= instantdex_recvquotes(coin,req,req->hashes,req->n)) != 0 )
myfree(req->hashes,(req->n+1) * sizeof(*req->hashes)), req->hashes = 0;
}*/
{
if ( (req= instantdex_recvquotes(coin,req,req->hashes,req->n)) != 0 )
myfree(req->hashes,(req->n+1) * sizeof(*req->hashes)), req->hashes = 0;
}*/
else printf("iguana_updatebundles unknown type.%c\n",req->type);//, getchar();
//fprintf(stderr,"finished coin->recvQ\n");
if ( req != 0 )
@ -1977,7 +1976,7 @@ int32_t iguana_processrecvQ(struct supernet_info *myinfo,struct iguana_info *coi
int32_t iguana_needhdrs(struct iguana_info *coin)
{
//if ( coin->longestchain == 0 || coin->blocks.hashblocks < coin->longestchain-coin->chain->bundlesize )
return(1);
return(1);
//else return(0);
}
@ -2053,7 +2052,7 @@ int32_t iguana_blockQ(char *argstr,struct iguana_info *coin,struct iguana_bundle
//printf("found valid [%d:%d] in blockQ\n",block!=0?block->hdrsi:-1,block!=0?block->bundlei:-1);
return(0);
}
//lag = (priority == 0) ? IGUANA_DEFAULTLAG*3 : IGUANA_DEFAULTLAG;
//lag = (priority == 0) ? IGUANA_DEFAULTLAG*3 : IGUANA_DEFAULTLAG;
now = (uint32_t)time(NULL);
block = iguana_blockfind("blockQ",coin,hash2);
if ( priority != 0 || block == 0 )//|| iguana_blockstatus(coin,block) == 0 )
@ -2262,7 +2261,7 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
coin->disableUTXO = 1;
//iguana_utxoupdate(coin,-1,0,0,0,0,-1,0); // free hashtables
if ( iguana_balanceflush(myinfo,coin,coin->balanceflush) > 0 )
printf("balanceswritten.%d flushed coin->balanceflush %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,coin->balanceflush,coin->longestchain/coin->chain->bundlesize);
printf("balanceswritten.%d flushed coin->balanceflush %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,coin->balanceflush,coin->longestchain/coin->chain->bundlesize);
//portable_mutex_unlock(&coin->RTmutex);
coin->disableUTXO = 0;
fprintf(stderr,"%s back balanceflush\n",coin->symbol);

BIN
iguana/pthreadVC2.lib

Binary file not shown.

BIN
iguana/pthreadvc2.dll

Binary file not shown.
Loading…
Cancel
Save