Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mycroft committed Aug 10, 2020
1 parent 9e7a476 commit f13cb14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CPP=g++
CPPFLAGS=-Wall -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -std=c++0x
CPPFLAGSWARN=-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align \
-Wconversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default \
-Wswitch-enum -Wundef -Wlogical-op -Winline

CPPFLAGS=-Wall -Wextra $(CPPFLAGSWARN) -I. -Ilibbase58 -Isecp256k1/include -Ibech32/ref/c -std=c++0x
LDFLAGS=-Lsecp256k1/.libs -lsecp256k1 -lcrypto -lleveldb -Llibbase58/.libs -lbase58 -Lbech32/ref/c -lbech32
SRCS=chainstate.cc hex.cc varint.cc pubkey.cc
OBJS=$(SRCS:.cc=.o)
Expand Down
6 changes: 3 additions & 3 deletions chainstate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ int main(int argc, char **argv)
cout << "Obfuscation key: " << string_to_hex(OBFUSCATE_KEY_KEY) << endl;
}

leveldb::Status s = db->Get(leveldb::ReadOptions(), OBFUSCATE_KEY_KEY, &obfuscate_key_str);
if (s.ok()) {
status = db->Get(leveldb::ReadOptions(), OBFUSCATE_KEY_KEY, &obfuscate_key_str);
if (status.ok()) {
// First byte: key size.
obfuscate_key_str = obfuscate_key_str.substr(1);
cerr << "using obfuscation key " << string_to_hex(obfuscate_key_str) << endl;
obfuscate_key = vector<unsigned char>(obfuscate_key_str.begin(), obfuscate_key_str.end());
} else {
if (s.IsNotFound()) {
if (status.IsNotFound()) {
cerr << "obfuscation key not found... Please check bitcoin's log and report if bitcoin's obfuscation key not 0000000000000000." << endl;
}
}
Expand Down

0 comments on commit f13cb14

Please sign in to comment.