nvmd / bitcoin Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bitcoin/bitcoin
Bitcoin Core integration/staging tree
Home Page: https://bitcoin.org/en/download
License: MIT License
This project forked from bitcoin/bitcoin
Bitcoin Core integration/staging tree
Home Page: https://bitcoin.org/en/download
License: MIT License
Checkpoints::GetTotalBlocksEstimate will probably fail/produce wrong results on 0.10 branch (commit 047a898).
checkpoints.cpp
:72-80
int GetTotalBlocksEstimate()
{
if (!fEnabled)
return 0;
const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
return checkpoints.rbegin()->first;
}
Suggest to change checkpoints.cpp
:79 from return checkpoints.rbegin()->first;
to return checkpoints.rbegin()->first + 1;
Daemon (0.10 branch, commit 047a898) crashes in InvalidChainFound when run with empty blockchain and genesis block is invalid (fails validity check).
GDB stacktrace:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
CBlockIndex::GetBlockHash (this=0x0) at chain.h:215
215 return *phashBlock;
(gdb) bt
#0 CBlockIndex::GetBlockHash (this=0x0) at chain.h:215
#1 0x0000000100157816 in InvalidChainFound (pindexNew=0x10160d5f0) at main.cpp:1365
#2 0x000000010018106e in InvalidBlockFound (pindex=0x10160d5f0, state=@0x7fff5fbf7a70) at main.cpp:1386
#3 0x000000010017fa12 in ConnectTip (state=@0x7fff5fbf7a70, pindexNew=0x10160d5f0, pblock=0x10085de30) at main.cpp:1989
#4 0x00000001001540d0 in ActivateBestChainStep (state=@0x7fff5fbf7a70, pindexMostWork=0x10160d5f0, pblock=0x10085de30) at main.cpp:2117
#5 0x0000000100152a18 in ActivateBestChain (state=@0x7fff5fbf7a70, pblock=0x10085de30) at main.cpp:2170
#6 0x0000000100163397 in InitBlockIndex () at main.cpp:3098
#7 0x0000000100071b9f in AppInit2 (threadGroup=@0x7fff5fbff688) at init.cpp:1036
#8 0x0000000100005c40 in AppInit (argc=10, argv=0x7fff5fbff898) at bitcoind.cpp:148
#9 0x0000000100005f0a in main (argc=10, argv=0x7fff5fbff898) at bitcoind.cpp:185
main.cpp
:1365:
LogPrintf("InvalidChainFound: current best=%s height=%d log2_work=%.8g date=%s\n",
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
chainActive.Tip()
is NULL
, possibly because we don't have an active chain/chain tip as the genesis block verification has just failed.
Seem to spend a lot of time in the loop of the second case ("use new nodes") of CAddrMan::Select_() (addrman.cpp) called from ThreadOpenConnections (net.cpp).
Regression was introduced in pull request bitcoin#5941 โ fixed size vvNew and vvTried make us spend a lot of time selecting non-empty position (i.e. the position with peer address) when actual peer number is significantly less than ADDRMAN_NEW_BUCKET_COUNT*ADDRMAN_BUCKET_SIZE. Moreover, position selection is an expensive operation as it uses secure random number generation involving OpenSSL.
Issue bitcoin#1664 is probably related too, or at least the safe buggy behavior can be expected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.