aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.cpp
AgeCommit message (Collapse)Author
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-09-28Implement BIP173 addresses and testsPieter Wuille
2017-09-06Merge #10682: Trivial: Move the AreInputsStandard documentation next to its ↵MarcoFalke
implementation ca67ddf0b Move the AreInputsStandard documentation next to its implementation (esneider) Pull request description: The documentation (and rationale) for `AreInputsStandard` somehow got separated from its implementation, and creates a bit of confusion: it's in the middle of the file, next to the implementation of `IsStandard`, which actually checks the "standardness" of outputs, not inputs. Tree-SHA512: 71281cbcbc5a5701cc11e812a3e90669dda3d92dc2176b512b7832d79b08b34307999c984516bb0c56b01db9b03a12ee4755f662efc1158f4e126de5ca421999
2017-07-17Remove factor of 3 from definition of dust.Alex Morcos
This redefines dust to be the value of an output such that it would cost that value in fees to (create and) spend the output at the dust relay rate. The previous definition was that it would cost 1/3 of the value. The default dust relay rate is correspondingly increased to 3000 sat/kB so the actual default dust output value of 546 satoshis for a non-segwit output remains unchanged. This commit is a refactor only unless a dustrelayfee is passed on the commandline in which case that number now needs to be increased by a factor of 3 to get the same behavior. -dustrelayfee is a hidden command line option. Note: It's not exactly a refactor due to edge case changes in rounding as evidenced by the required change to the unit test.
2017-07-14Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell
Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate size limit from the weight limit when it fact it is superfluous, and used in early tests before the witness data has been validated or just to compute worst case sizes. The size checks that use it would not behave any differently consensus wise if they were eliminated completely. Its correct value is not independently settable but is a function of the weight limit and weight formula. This patch just eliminates it and uses the scale factor as required to compute the worse case constants. It also moves the weight factor out of primitives into consensus, which is a more logical place for it.
2017-06-27Move the AreInputsStandard documentation next to its implementationesneider
2017-06-22scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón
-BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-06-01Merge CCoinsViewCache's GetOutputFor and AccessCoinPieter Wuille
They're doing the same thing now.
2017-05-19Prevent shadowing the global dustRelayFee.Pavel Janík
2017-05-03Consensus: Minimal way to move dust out of consensusJorge Timón
2017-04-13Missing includesJorge Timón
2017-01-16Introduce -dustrelayfeeAlex Morcos
2017-01-16Introduce -incrementalrelayfeeAlex Morcos
2016-12-04Move CTxInWitness inside CTxInPieter Wuille
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-11-14update comments for tx weightBrian Deery
2016-11-06[copyright] copyright header style uniformisle2983
Three categories of modifications: 1) 1 instance of 'The Bitcoin Core developers \n', 1 instance of 'the Bitcoin Core developers\n', 3 instances of 'Bitcoin Core Developers\n', and 12 instances of 'The Bitcoin developers\n' are made uniform with the 443 instances of 'The Bitcoin Core developers\n' 2) 3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6 instances of 'BitPay Inc\.\n' 3) 4 instances where there was no '(c)' between the 'Copyright' and the year where it deviates from the style of the local directory.
2016-10-16Add standard limits for P2WSH with testsJohnson Lau
2016-07-26Merge #8381: Make witness v0 outputs non-standardWladimir J. van der Laan
c59c434 qa: Add test for standardness of segwit v0 outputs (Suhas Daftuar) 1ffaff2 Make witness v0 outputs non-standard before segwit activation (Johnson Lau)
2016-07-23qa: Add test for standardness of segwit v0 outputsSuhas Daftuar
2016-07-22Make witness v0 outputs non-standard before segwit activationJohnson Lau
2016-07-19Treat high-sigop transactions as larger rather than rejecting themPieter Wuille
2016-07-18Rename "block cost" to "block weight"Suhas Daftuar
2016-06-22BIP141: Other consensus critical limits, and BIP145Pieter Wuille
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22BIP143: Verification logicPieter Wuille
Includes simplifications by Eric Lombrozo.
2016-04-08Doc: Update isStandardTx commentMatthew English
2016-03-18Policy: allow transaction version 2 relay policy.BtcDrak
This commit introduces a way to gracefully bump the default transaction version in a two step process.
2016-02-01Get rid of inaccurate ScriptSigArgsExpectedPieter Wuille
(cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)
2016-01-07Merge pull request #7266Wladimir J. van der Laan
6cd198f Removed comment about IsStandard for P2SH scripts (Marcel Krüger)
2015-12-30Removed comment about IsStandard for P2SH scriptsMarcel Krüger
Since #4365 (62599373883a66a958136f48ab0e2b826e3d5bf8) P2SH scripts do not have to be IsStandard scripts.
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-11-28Constrain constant values to a single location in codeLuke Dashjr
2015-10-01Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd
Previously only one PUSHDATA was allowed, needlessly limiting applications such as matching OP_RETURN contents with bloom filters that operate on a per-PUSHDATA level. Now any combination that passes IsPushOnly() is allowed, so long as the total size of the scriptPubKey is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings) Also, this fixes the odd bug where previously the PUSHDATA could be replaced by any single opcode, even sigops consuming opcodes such as CHECKMULTISIG. (20 sigops!)
2015-06-26Policy: MOVEONLY: 3 functions to policy.o:Luke Dashjr
- [script/standard.o] IsStandard - [main.o] IsStandardTx - [main.o] AreInputsStandard Also, don't use namespace std in policy.cpp