aboutsummaryrefslogtreecommitdiff
path: root/src/versionbits.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Always-active versionbits supportPieter Wuille2017-11-061-0/+10
|
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-1/+1
| | | | In order to avoid unintended implicit conversions.
* Merge #10957: Avoid returning a BIP9Stats object with uninitialized valuesMarcoFalke2017-08-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3eb53b867 Avoid returning a BIP9Stats object with uninitialized values (practicalswift) Pull request description: Uninitialized data potentially used in `rpc/blockchain.cpp`: ``` static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id) { ... const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id); ... if (THRESHOLD_STARTED == thresholdState) { UniValue statsUV(UniValue::VOBJ); BIP9Stats statsStruct = VersionBitsTipStatistics(consensusParams, id); statsUV.push_back(Pair("period", statsStruct.period)); statsUV.push_back(Pair("threshold", statsStruct.threshold)); statsUV.push_back(Pair("elapsed", statsStruct.elapsed)); statsUV.push_back(Pair("count", statsStruct.count)); statsUV.push_back(Pair("possible", statsStruct.possible)); rv.push_back(Pair("statistics", statsUV)); } ... return rv; } ``` Friendly ping @pinheadmz :-) Tree-SHA512: cc1debe11d81157b9fa8e6064bfec199524cd1e2d0230ff35f45d97ecabbc664df8423edb1c9e4ba3daf19bbd51ab87bb50e5e5cd279be1d2aa1f7d8b300f148
| * Avoid returning a BIP9Stats object with uninitialized valuespracticalswift2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninitialized data potentially used in `rpc/blockchain.cpp`: ``` static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id) { ... const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id); ... if (THRESHOLD_STARTED == thresholdState) { UniValue statsUV(UniValue::VOBJ); BIP9Stats statsStruct = VersionBitsTipStatistics(consensusParams, id); statsUV.push_back(Pair("period", statsStruct.period)); statsUV.push_back(Pair("threshold", statsStruct.threshold)); statsUV.push_back(Pair("elapsed", statsStruct.elapsed)); statsUV.push_back(Pair("count", statsStruct.count)); statsUV.push_back(Pair("possible", statsStruct.possible)); rv.push_back(Pair("statistics", statsUV)); } ... return rv; } ```
* | scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-5/+5
|/ | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
* Use the override specifier (C++11) where we expect to be overriding the ↵practicalswift2017-06-281-5/+5
| | | | virtual function of a base class
* Merge #9544: [trivial] Add end of namespace comments. Improve consistency.Wladimir J. van der Laan2017-06-261-1/+1
|\ | | | | | | | | | | 5a9b508 [trivial] Add end of namespace comments (practicalswift) Tree-SHA512: 92b0fcae4d1d3f4da9e97569ae84ef2d6e09625a5815cd0e5f0eb6dd2ecba9852fa85c184c5ae9de5117050330ce995e9867b451fa8cd5512169025990541a2b
| * [trivial] Add end of namespace commentspracticalswift2017-05-311-1/+1
| |
* | scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/Jorge Timón2017-05-301-1/+1
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BIP9DeploymentInfo/VBDeploymentInfo/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* | RPC: getblockchaininfo: BIP9 statsMatthew Zipkin2017-03-241-1/+35
|/ | | | add RPC tests for BIP9 counting stats
* Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar2017-03-141-1/+1
| | | | | | Segwit's version bit will be signalled for all invocations of CreateNewBlock, and not specifying segwit only will cause CreateNewBlock to skip transactions with witness from being selected.
* RPC: augment getblockchaininfo bip9_softforks datamruddy2016-10-191-0/+35
|
* BIP141: Commitment structure and deploymentPieter Wuille2016-06-221-0/+4
| | | | Includes a fix by Suhas Daftuar and LongShao007
* Merge #7935: Versionbits: GBT supportPieter Wuille2016-06-081-0/+13
|\ | | | | | | | | | | | | 12c708a getblocktemplate: Use version/force mutation to support pre-BIP9 clients (Luke Dashjr) 9879060 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not (Luke Dashjr) 72cd6b2 qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates (Luke Dashjr) d3df40e Implement BIP 9 GBT changes (Luke Dashjr)
| * getblocktemplate: Explicitly handle the distinction between GBT-affecting ↵Luke Dashjr2016-06-061-0/+2
| | | | | | | | softforks vs not
| * Implement BIP 9 GBT changesLuke Dashjr2016-06-061-0/+11
| | | | | | | | | | | | | | - BIP9DeploymentInfo struct for static deployment info - VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names - getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN - In this commit, all rules are considered required for clients to support
* | Fix typo: Optimizaton -> Optimizationpaveljanik2016-04-011-1/+1
|/
* BIP9 ImplementationPieter Wuille2016-03-151-0/+133
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and based on code by Jorge Timon.