Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mining verus #77

Open
wants to merge 76 commits into
base: windows
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3e5b739
Add files via upload
monkins1010 Jun 29, 2018
8088127
ADded verus hash
monkins1010 Sep 8, 2018
849be5e
updated for linux build
monkins1010 Sep 8, 2018
c9afd74
Add files via upload
monkins1010 Sep 8, 2018
2e09238
updated for verus
monkins1010 Sep 8, 2018
448ce4d
Add files via upload
monkins1010 Sep 8, 2018
1a1b196
updated for verus linux build
Sep 9, 2018
5dc622f
new
monkins1010 Sep 12, 2018
b26016f
cuda 8v821 s
monkins1010 Oct 9, 2018
27837f3
Add files via upload
monkins1010 Oct 9, 2018
6b90d23
Update verusscan.cpp
monkins1010 Oct 9, 2018
c984f96
Add files via upload
monkins1010 Oct 13, 2018
3f7b327
Add files via upload
monkins1010 Oct 13, 2018
758b191
Add files via upload
monkins1010 Oct 13, 2018
c707c9e
removed cuda
monkins1010 Oct 13, 2018
1fed8aa
Add files via upload
monkins1010 Oct 13, 2018
3aaa57b
Add files via upload
monkins1010 Oct 13, 2018
f27fab5
Add files via upload
monkins1010 Oct 13, 2018
ea52914
Update ccminer.cpp
monkins1010 Oct 13, 2018
5b00b72
Update miner.h
monkins1010 Oct 13, 2018
6367278
Update verusscan.cpp
monkins1010 Oct 13, 2018
52617d6
nonce changed
monkins1010 Oct 14, 2018
eb5b707
Update verusscan.cpp
monkins1010 Oct 14, 2018
72e3a4a
updated to max 60 threads
monkins1010 Oct 14, 2018
2b66124
Add files via upload
monkins1010 Oct 16, 2018
502c9f4
updated to -marchnative compiler
monkins1010 Oct 28, 2018
62771eb
Update Makefile.am
monkins1010 Oct 28, 2018
89cf75e
re ordered for slight speed
monkins1010 Dec 9, 2018
736084d
update for v3.1
monkins1010 Dec 9, 2018
6dae1ca
Updated for verus2
monkins1010 Feb 3, 2019
bbf54c4
updated for verushashv2
monkins1010 Feb 3, 2019
1c31b30
updated to v2
monkins1010 Feb 3, 2019
f5e0be8
v2
monkins1010 Feb 3, 2019
bbcd94a
fixup key cache adjust
monkins1010 Feb 8, 2019
876c20e
v2 now with smaller fix key
monkins1010 Feb 8, 2019
d55c617
Add files via upload
monkins1010 Feb 27, 2019
f3d5365
Add files via upload
monkins1010 Feb 27, 2019
3e67c4d
fixed immintrin bug
monkins1010 Apr 9, 2019
07079c6
Tidy up and fix leak
monkins1010 Nov 5, 2019
2c97d7e
v2.1
Dec 11, 2019
0285c62
Add files via upload
monkins1010 Dec 12, 2019
ce8ad0e
Add files via upload
monkins1010 Dec 12, 2019
cc57d5b
added auto switch to verushash 2.1
monkins1010 Dec 14, 2019
b3e7a42
updated hash
monkins1010 Dec 14, 2019
8c515b0
Verus 2.1 only
monkins1010 Dec 16, 2019
a2ae360
prefetch
monkins1010 Dec 17, 2019
70c35f8
fixed boos
monkins1010 Dec 18, 2019
1b9ccbb
Added verus2.2
monkins1010 Jun 10, 2020
690a003
Bug fix for autoswitch
monkins1010 Jun 11, 2020
3909afe
Update ccminer-config.h
monkins1010 Jun 11, 2020
c9f500e
Update ccminer-config.h
monkins1010 Jun 11, 2020
5fa9aca
Update configure.ac
monkins1010 Jun 11, 2020
4ad7176
Delete verus.cu
monkins1010 Jun 14, 2020
b0f7f6f
Use all available cores to build
BloodyNora Aug 13, 2020
c4d7c74
Merge pull request #4 from BloodyNora/Verus2.2
monkins1010 Aug 17, 2020
44e8ea9
add support for native building on freebsd (#5)
BloodyNora Aug 30, 2020
7bc126b
3.7.1
monkins1010 Dec 1, 2020
de0e712
Update configure.ac
monkins1010 Dec 1, 2020
115a524
Update ccminer.cpp
monkins1010 Dec 1, 2020
bffb815
Update run
monkins1010 Dec 5, 2020
8e3c4fa
redundant code removed
monkins1010 Nov 29, 2021
8e98718
change to make API show global hashrate
monkins1010 Jul 12, 2022
7a911a0
Merge branch 'Verus2.2' of https://github.com/monkins1010/ccminer int…
monkins1010 Jul 12, 2022
1bd9340
updates for correct solution parsing
monkins1010 May 19, 2023
374d327
Add PBaas/Merged Mining Support (#12)
hellcatz May 20, 2023
7c739a0
Update version
monkins1010 May 20, 2023
1d50a3c
Merge branch 'Verus2.2' of https://github.com/monkins1010/ccminer int…
monkins1010 May 20, 2023
3b78957
Updates for pbaas Activation
monkins1010 May 20, 2023
ac12b21
fix verus difficulty (#10)
avaziman May 20, 2023
9704c1c
Better organize last 15 bytes of solution (#15)
hellcatz May 26, 2023
7af01b3
MACOS UPDATES
monkins1010 May 26, 2023
a09e143
updates for libcurl
monkins1010 May 26, 2023
6e925a0
better nonce randomness
monkins1010 May 26, 2023
7c48189
Allow 3 byte extranonce
monkins1010 May 27, 2023
1997eda
restart on new notify
monkins1010 May 27, 2023
1ba0bf3
optimizations speed increase
monkins1010 Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
  • Loading branch information
monkins1010 committed Oct 13, 2018
commit c984f96fb3fe5d043ce1f8a525e7f3ad71fc9c0f
160 changes: 7 additions & 153 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,93 +16,22 @@ SUBDIRS = compat
bin_PROGRAMS = ccminer

ccminer_SOURCES = elist.h miner.h compat.h \
compat/inttypes.h compat/stdbool.h compat/unistd.h \
compat/inttypes.h compat/stdbool.h compat/unistd.h bignum.cpp bignum.hpp \
compat/sys/time.h compat/getopt/getopt.h \
crc32.c hefty1.c \
ccminer.cpp pools.cpp util.cpp bench.cpp bignum.cpp \
api.cpp hashlog.cpp nvml.cpp stats.cpp sysinfos.cpp cuda.cpp \
nvsettings.cpp \
equi/equi-stratum.cpp equi/equi.cpp equi/blake2/blake2bx.cpp \
equi/equihash.cpp equi/cuda_equi.cu \
heavy/heavy.cu \
heavy/cuda_blake512.cu heavy/cuda_blake512.h \
heavy/cuda_combine.cu heavy/cuda_combine.h \
heavy/cuda_groestl512.cu heavy/cuda_groestl512.h \
heavy/cuda_hefty1.cu heavy/cuda_hefty1.h \
heavy/cuda_keccak512.cu heavy/cuda_keccak512.h \
heavy/cuda_sha256.cu heavy/cuda_sha256.h \
heavy/bastion.cu heavy/cuda_bastion.cu \
fuguecoin.cpp Algo256/cuda_fugue256.cu sph/fugue.c uint256.h \
groestlcoin.cpp cuda_groestlcoin.cu cuda_groestlcoin.h \
myriadgroestl.cpp cuda_myriadgroestl.cu \
lyra2/Lyra2.c lyra2/Sponge.c \
lyra2/lyra2RE.cu lyra2/cuda_lyra2.cu \
lyra2/lyra2REv2.cu lyra2/cuda_lyra2v2.cu \
lyra2/Lyra2Z.c lyra2/lyra2Z.cu lyra2/cuda_lyra2Z.cu \
lyra2/allium.cu \
Algo256/cuda_bmw256.cu Algo256/cuda_cubehash256.cu \
Algo256/cuda_blake256.cu Algo256/cuda_groestl256.cu \
Algo256/cuda_keccak256_sm3.cu Algo256/cuda_keccak256.cu Algo256/cuda_skein256.cu \
Algo256/blake256.cu Algo256/decred.cu Algo256/vanilla.cu Algo256/keccak256.cu \
Algo256/blake2s.cu sph/blake2s.c \
Algo256/bmw.cu Algo256/cuda_bmw.cu \
crypto/xmr-rpc.cpp crypto/wildkeccak-cpu.cpp crypto/wildkeccak.cu \
crypto/cryptolight.cu crypto/cryptolight-core.cu crypto/cryptolight-cpu.cpp \
crypto/cryptonight.cu crypto/cryptonight-core.cu crypto/cryptonight-extra.cu \
crypto/cryptonight-cpu.cpp crypto/oaes_lib.cpp crypto/aesb.cpp crypto/cpu/c_keccak.c \
JHA/jha.cu JHA/jackpotcoin.cu JHA/cuda_jha_keccak512.cu \
JHA/cuda_jha_compactionTest.cu cuda_checkhash.cu \
quark/cuda_jh512.cu quark/cuda_quark_blake512.cu quark/cuda_quark_groestl512.cu quark/cuda_skein512.cu \
quark/cuda_bmw512.cu quark/cuda_quark_keccak512.cu \
quark/nist5.cu \
quark/quarkcoin.cu quark/cuda_quark_compactionTest.cu \
neoscrypt/neoscrypt.cpp neoscrypt/neoscrypt-cpu.c neoscrypt/cuda_neoscrypt.cu \
pentablake.cu skein.cu cuda_skeincoin.cu skein2.cpp zr5.cu \
skunk/skunk.cu skunk/cuda_skunk.cu skunk/cuda_skunk_streebog.cu \
sha256/sha256d.cu sha256/cuda_sha256d.cu sha256/sha256t.cu sha256/cuda_sha256t.cu \
sia/sia.cu sia/sia-rpc.cpp sph/blake2b.c \
sph/bmw.c sph/blake.c sph/groestl.c sph/jh.c sph/keccak.c sph/skein.c \
sph/cubehash.c sph/echo.c sph/luffa.c sph/sha2.c sph/shavite.c sph/simd.c \
sph/hamsi.c sph/hamsi_helper.c sph/streebog.c \
sph/shabal.c sph/whirlpool.c sph/sha2big.c sph/haval.c \
sph/ripemd.c sph/sph_sha2.c \
polytimos.cu \
lbry/lbry.cu lbry/cuda_sha256_lbry.cu lbry/cuda_sha512_lbry.cu lbry/cuda_lbry_merged.cu \
qubit/qubit.cu qubit/qubit_luffa512.cu qubit/deep.cu qubit/luffa.cu \
tribus/tribus.cu tribus/cuda_echo512_final.cu \
x11/x11.cu x12/x12.cu x11/fresh.cu x11/cuda_x11_luffa512.cu x11/cuda_x11_cubehash512.cu \
x11/cuda_x11_shavite512.cu x11/cuda_x11_simd512.cu x11/cuda_x11_echo.cu \
x11/cuda_x11_luffa512_Cubehash.cu x11/x11evo.cu x11/timetravel.cu x11/bitcore.cu \
x13/x13.cu x13/cuda_x13_hamsi512.cu x13/cuda_x13_fugue512.cu \
x13/hsr.cu x13/cuda_hsr_sm3.cu x13/sm3.c \
x15/x14.cu x15/x15.cu x15/cuda_x14_shabal512.cu x15/cuda_x15_whirlpool.cu \
x15/whirlpool.cu x15/cuda_x15_whirlpool_sm3.cu \
x16/x16r.cu x16/x16s.cu x16/cuda_x16_echo512.cu x16/cuda_x16_fugue512.cu \
x16/cuda_x16_shabal512.cu x16/cuda_x16_simd512_80.cu \
x16/cuda_x16_echo512_64.cu \
x17/x17.cu x17/hmq17.cu x17/sonoa.cu x17/cuda_x17_haval256.cu x17/cuda_x17_sha512.cu \
phi/phi.cu phi/phi2.cu phi/cuda_phi2.cu phi/cuda_phi2_cubehash512.cu x11/cuda_streebog_maxwell.cu \
x11/c11.cu x11/s3.cu x11/sib.cu x11/veltor.cu x11/cuda_streebog.cu \
verus/haraka.c verus/haraka.h verus/verus.cu verus/verusscan.cpp
# scrypt
ccminer_SOURCES += scrypt.cpp scrypt-jane.cpp \
scrypt/blake.cu scrypt/keccak.cu scrypt/sha256.cu \
scrypt/salsa_kernel.cu scrypt/test_kernel.cu \
scrypt/fermi_kernel.cu scrypt/kepler_kernel.cu \
scrypt/nv_kernel.cu scrypt/nv_kernel2.cu scrypt/titan_kernel.cu

if HAVE_NVML
nvml_defs = -DUSE_WRAPNVML
nvml_libs = -ldl
endif
ccminer.cpp pools.cpp util.cpp bench.cpp \
api.cpp hashlog.cpp stats.cpp sysinfos.cpp \
equi/equi-stratum.cpp verus/verusscan.cpp verus/haraka.c verus/haraka.h



if HAVE_WINDOWS
ccminer_SOURCES += compat/winansi.c
endif

ccminer_LDFLAGS = $(PTHREAD_FLAGS) @CUDA_LDFLAGS@
ccminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ @CUDA_LIBS@ @OPENMP_CFLAGS@ @LIBS@ $(nvml_libs)
ccminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(CPPFLAGS) $(PTHREAD_FLAGS) -msse4.1 -maes -fno-strict-aliasing $(JANSSON_INCLUDES) $(DEF_INCLUDES) $(nvml_defs)
ccminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(CPPFLAGS) $(PTHREAD_FLAGS) -msse4.2 -maes -fno-strict-aliasing $(JANSSON_INCLUDES) $(DEF_INCLUDES) $(nvml_defs)

if HAVE_OSX
ccminer_CPPFLAGS += -I/usr/local/llvm/lib/clang/4.0.0/include
Expand All @@ -125,80 +54,5 @@ nvcc_ARCH += -gencode=arch=compute_50,code=\"sm_50,compute_50\"
nvcc_FLAGS = $(nvcc_ARCH) @CUDA_INCLUDES@ -I. @CUDA_CFLAGS@
nvcc_FLAGS += $(JANSSON_INCLUDES) --ptxas-options="-v"

# we're now targeting all major compute architectures within one binary.
.cu.o:
$(NVCC) $(nvcc_FLAGS) --maxrregcount=128 -o $@ -c $<

Algo256/blake256.o: Algo256/blake256.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=64 -o $@ -c $<

Algo256/cuda_bmw.o: Algo256/cuda_bmw.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=76 -o $@ -c $<

crypto/cryptonight-core.o: crypto/cryptonight-core.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=64 -o $@ -c $<

crypto/cryptonight-extra.o: crypto/cryptonight-extra.cu
$(NVCC) $(nvcc_FLAGS) -o $@ -c $<

heavy/cuda_hefty1.o: heavy/cuda_hefty1.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

qubit/qubit_luffa512.o: qubit/qubit_luffa512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

# Luffa and Echo are faster with 80 registers than 128
x11/cuda_x11_luffa512.o: x11/cuda_x11_luffa512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

x11/cuda_x11_luffa512_Cubehash.o: x11/cuda_x11_luffa512_Cubehash.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=76 -o $@ -c $<

x11/cuda_x11_simd512.o: x11/cuda_x11_simd512.cu
$(NVCC) $(nvcc_FLAGS) -Xcompiler -Wno-unused-variable -o $@ -c $<

x13/cuda_x13_hamsi512.o: x13/cuda_x13_hamsi512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=72 -o $@ -c $<

x17/cuda_x17_sha512.o: x17/cuda_x17_sha512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

quark/cuda_quark_blake512.o: quark/cuda_quark_blake512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

quark/cuda_jh512.o: quark/cuda_jh512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

quark/cuda_quark_keccak512.o: quark/cuda_quark_keccak512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=88 -o $@ -c $<

quark/cuda_quark_compactionTest.o: quark/cuda_quark_compactionTest.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

JHA/cuda_jha_compactionTest.o: JHA/cuda_jha_compactionTest.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<

# This object does not use cuda device code but call the different kernels (autotune)
scrypt/salsa_kernel.o: scrypt/salsa_kernel.cu
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o $@ -c $<

# These kernels are for older devices (SM)

scrypt/test_kernel.o: scrypt/test_kernel.cu
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o $@ -c $<

scrypt/fermi_kernel.o: scrypt/fermi_kernel.cu
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o $@ -c $<

scrypt/kepler_kernel.o: scrypt/kepler_kernel.cu
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o $@ -c $<

scrypt/nv_kernel.o: scrypt/nv_kernel.cu
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o $@ -c $<

scrypt/titan_kernel.o: scrypt/titan_kernel.cu
$(NVCC) $(nvcc_FLAGS) -gencode=arch=compute_35,code=\"sm_35,compute_35\" -o $@ -c $<

skein.o: skein.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=64 -o $@ -c $<

41 changes: 0 additions & 41 deletions bignum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,6 @@

#include "miner.h" // hex2bin

extern "C" double bn_convert_nbits(const uint32_t nBits)
{
uint256 bn = CBigNum().SetCompact(nBits).getuint256();
return bn.getdouble();
}

// copy the big number to 32-bytes uchar
extern "C" void bn_nbits_to_uchar(const uint32_t nBits, unsigned char *target)
{
char buff[65];
uint256 bn = CBigNum().SetCompact(nBits).getuint256();

snprintf(buff, 65, "%s\n", bn.ToString().c_str()); buff[64] = '\0';
hex2bin(target, buff, 32);
}

// unused, but should allow more than 256bits targets
#if 0
extern "C" double bn_hash_target_ratio(uint32_t* hash, uint32_t* target)
{
double dhash;

if (!opt_showdiff)
return 0.0;

CBigNum h(0), t(0);
std::vector<unsigned char> vch(32);

memcpy(&vch[0], (void*) target, 32);
t.setvch(vch);
memcpy(&vch[0], (void*) hash, 32);
h.setvch(vch);

dhash = h.getuint256().getdouble();
if (dhash > 0.)
return t.getuint256().getdouble() / dhash;
else
return dhash;
}
#endif

// compute the diff ratio between a found hash and the target
extern "C" double bn_hash_target_ratio(uint32_t* hash, uint32_t* target)
{
Expand Down
27 changes: 14 additions & 13 deletions bignum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_BIGNUM_H
#define BITCOIN_BIGNUM_H

Expand Down Expand Up @@ -102,14 +103,14 @@ class CBigNum
CBigNum(signed char n) { init(); if (n >= 0) setulong(n); else setint64(n); }
CBigNum(short n) { init(); if (n >= 0) setulong(n); else setint64(n); }
CBigNum(int n) { init(); if (n >= 0) setulong(n); else setint64(n); }
CBigNum(long n) { init(); if (n >= 0) setulong(n); else setint64(n); }
CBigNum(int64 n) { init(); setint64(n); }
// CBigNum(long n) { init(); if (n >= 0) setulong(n); else setint64(n); }
// CBigNum(int64_t n) { init(); setint64(n); }
CBigNum(unsigned char n) { init(); setulong(n); }
CBigNum(unsigned short n) { init(); setulong(n); }
CBigNum(unsigned int n) { init(); setulong(n); }
CBigNum(unsigned long n) { init(); setulong(n); }
CBigNum(uint64 n) { init(); setuint64(n); }
explicit CBigNum(uint256 n) { init(); setuint256(n); }
// CBigNum(unsigned long n) { init(); setulong(n); }
// CBigNum(uint64_t n) { init(); setuint64(n); }
//explicit CBigNum(uint256_t n) { init(); setuint256(n); }

explicit CBigNum(const std::vector<unsigned char>& vch)
{
Expand Down Expand Up @@ -142,14 +143,14 @@ class CBigNum
return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
}

void setint64(int64 sn)
void setint64(int64_t sn)
{
unsigned char pch[sizeof(sn) + 6];
unsigned char* p = pch + 4;
bool fNegative;
uint64 n;
uint64_t n;

if (sn < (int64)0)
if (sn < (int64_t)0)
{
// Since the minimum signed integer cannot be represented as positive so long as its type is signed, and it's not well-defined what happens if you make it unsigned before negating it, we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate
n = -(sn + 1);
Expand Down Expand Up @@ -185,7 +186,7 @@ class CBigNum
BN_mpi2bn(pch, p - pch, self);
}

uint64 getuint64()
uint64_t getuint64()
{
unsigned int nSize = BN_bn2mpi(self, NULL);
if (nSize < 4)
Expand All @@ -194,13 +195,13 @@ class CBigNum
BN_bn2mpi(self, &vch[0]);
if (vch.size() > 4)
vch[4] &= 0x7f;
uint64 n = 0;
uint64_t n = 0;
for (unsigned int i = 0, j = vch.size()-1; i < sizeof(n) && j >= 4; i++, j--)
((unsigned char*)&n)[i] = vch[j];
return n;
}

void setuint64(uint64 n)
void setuint64(uint64_t n)
{
unsigned char pch[sizeof(n) + 6];
unsigned char* p = pch + 4;
Expand All @@ -227,7 +228,7 @@ class CBigNum
BN_mpi2bn(pch, p - pch, self);
}

void setuint256(uint256 n)
/* void setuint256(uint256 n)
{
unsigned char pch[sizeof(n) + 6];
unsigned char* p = pch + 4;
Expand Down Expand Up @@ -268,7 +269,7 @@ class CBigNum
for (unsigned int i = 0, j = vch.size()-1; i < sizeof(n) && j >= 4; i++, j--)
((unsigned char*)&n)[i] = vch[j];
return n;
}
}*/


void setvch(const std::vector<unsigned char>& vch)
Expand Down
Loading