diff -uNr a/bitcoin/manifest b/bitcoin/manifest --- a/bitcoin/manifest 8596caee33aae6890950ffe69970f4f3ed8b237c28d834781825ee1278bc464f3bca723c239ffaf44f68828fd5e8279d654f1d3e7bae1bce2cb9b3aff84e0149 +++ b/bitcoin/manifest 719127a6ce6e341bb8d959957434f25276df9f8db29285bccc1f796295bbc3b608bb5237c8c29f44eef3b5c0b32422b61c3b22d4139e155a6ea08225268df84f @@ -34,3 +34,4 @@ 617255 mod6_whogaveblox mod6 Regrind of asciilifeform original; Record the origin of every incoming candidate block (whether accepted or rejected) 625543 bitcoin_rawtx_get_send jfw Add hex raw transaction RPC commands: 'getrawtransaction' fetches from mempool or database; 'sendrawtransaction' injects to mempool or wallet and broadcasts (based loosely on earlier sendrawtransaction patch by polarbeard). Minor simplifications based on new higher-level mempool accessors. 625543 bitcoin_system_compiler jfw Build system simplification focused on using the system compiler. +688130 bitcoin_dumpblock_no_losers jfw Correct 'dumpblock' to restrict its search to the current best chain, rather than dumping the first matching block by height (which may have lost the mining race and been reorganized away). diff -uNr a/bitcoin/src/bitcoinrpc.cpp b/bitcoin/src/bitcoinrpc.cpp --- a/bitcoin/src/bitcoinrpc.cpp 5ff9020cf351544e56c82f4ed5962c8236709dae22ce128199c04be28c179d936acdfa54dde7d31d94a7200ede9cece109a170d52960d218a4277ead71707aec +++ b/bitcoin/src/bitcoinrpc.cpp 48e11afd9f1ad6cd2a8f61d3d49f5cf7c7519a86d8cc494a16cd6bc04f31f92b8d9b4adf6c14117c661a83fadfa8ead46c2d0d882ce4fdfb777568be4e377bcf @@ -1806,7 +1806,7 @@ for (map::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi) { CBlockIndex *pindex = (*mi).second; - if (pindex->nHeight == want_height) { + if (pindex->nHeight == want_height && pindex->IsInMainChain()) { CBlock block; block.ReadFromDisk(pindex); printf("Dumping block %d to %s\n", want_height, filename.c_str());