Repository navigation
Prevent crashes due to missing or corrupted database records - #1381
Merged
Merged
Conversation
Contributor
|
ACK, long overdue. Compiled and ran on my Mac. |
added 2 commits
May 22, 2012 15:12
Any problems seen during deserialization will throw an uncaught exception, crashing the entire bitcoin process. Properly return an error instead, so that we may at least log the error and gracefully shutdown other portions of the app.
In LoadExternalBlockFile(), errors are already caught... silently. Add a warning message, even though we do not abort the program due to load error.
Contributor
Author
|
Added new commit, catching deser exceptions for CAutoFile (blknnnn.dat) too. |
jgarzik
pushed a commit
that referenced
this pull request
May 22, 2012
Prevent crashes due to missing or corrupted database records
coblee
pushed a commit
to litecoin-project/litecoin
that referenced
this pull request
Jul 17, 2012
Prevent crashes due to missing or corrupted database records
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Jan 22, 2019
Implement little endian ascending transaction ordering (CTOR)
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
May 6, 2020
…ner, not rank-1 mn 83e01fa [RPC][Bug] Fix masternodecurrent: return next winner, not rank-1 mn (random-zebra) Pull request description: `masternodecurrent` RPC is improperly returning the masternode with rank 1 instead of the next winner. Closes bitcoin#1348 ``` > getblockcount 2236241 > masternodecurrent { "protocol": 70918, "txhash": "cfa69f018741e0960a436788391d9d2cec0f9aceed30e883a78818f7c073fba1", "pubkey": "DHeEycDFe9pWr3FahcnTbavy8Urb1832HU", "lastseen": 1583439177, "activeseconds": 6690804 } > getmasternodewinners 0 [ { "nHeight": 2236242, "winner": { "address": "DHeEycDFe9pWr3FahcnTbavy8Urb1832HU", "nVotes": 10 } }, ... ] ``` <https://explorer.pivx.link/block/9fe33eedf5f61a8e9f8d50b9007c25d1b0260f0c97f88265feda4c06dfa86725> Note: `GetCurrentMasterNode` returns the masternode with lower rank and it's used as winner only when no valid block payee can be found. We should probably change its name to something more meaningful (`GetLowestRankMasterNode` ?) and change the comment calling it "winner". Same goes for the comment above `CMasternode::CalculateScore` (masternodes are not even paid based on their scores, but only on the time of their last payment). ACKs for top commit: furszy: utACK 83e01fa Fuzzbawls: ACK 83e01fa Tree-SHA512: c6bd9b5c83900a4e269b6dd308ea083bc0d4a778ebbf1c865019d092cba9b024819d97f792d9fd34040f36034d507eda482da398a34915e9497db3bf1b70d9b3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Any problems seen during deserialization will throw an uncaught
exception, crashing the entire bitcoin process. Properly return an
error instead, so that we may at least log the error and gracefully
shutdown other portions of the app.