practicalswift
64fb0ac016
Declare single-argument (non-converting) constructors "explicit"
...
In order to avoid unintended implicit conversions.
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal 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-
7 years ago
practicalswift
3eb53b8671
Avoid returning a BIP9Stats object with uninitialized values
...
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;
}
```
7 years ago
practicalswift
aa95947ded
Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class
7 years ago
practicalswift
5a9b508279
[trivial] Add end of namespace comments
8 years ago
Jorge Timón
b463bc9215
scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/
...
-BEGIN VERIFY SCRIPT-
sed -i 's/BIP9DeploymentInfo/VBDeploymentInfo/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
8 years ago
Matthew Zipkin
557c9a68fb
RPC: getblockchaininfo: BIP9 stats
...
add RPC tests for BIP9 counting stats
8 years ago
Suhas Daftuar
abe7b3d3ab
Don't require segwit in getblocktemplate for segwit signalling or mining
...
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.
8 years ago
mruddy
fc146095d2
RPC: augment getblockchaininfo bip9_softforks data
8 years ago
Pieter Wuille
8b49040854
BIP141: Commitment structure and deployment
...
Includes a fix by Suhas Daftuar and LongShao007
9 years ago
Luke Dashjr
98790608a4
getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not
9 years ago
Luke Dashjr
d3df40e51a
Implement BIP 9 GBT changes
...
- 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
9 years ago
paveljanik
a22bde9449
Fix typo: Optimizaton -> Optimization
9 years ago
Pieter Wuille
6851107b3a
BIP9 Implementation
...
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and
based on code by Jorge Timon.
9 years ago