aboutsummaryrefslogtreecommitdiff
path: root/src/core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Discover some missing includesjtimon2014-09-021-0/+2
|
* changed field types in some structures to equivalent unambiguous typesKamil Domanski2014-08-301-2/+2
| | | | | | | | Conflicts: src/core.cpp Rebased-By: Wladimir J. van der Laan Github-Pull: #4180
* Move strprintf define to tinyformat.hWladimir J. van der Laan2014-08-201-1/+1
| | | | This avoids a dependency on util.h if just tinyformat is needed.
* Remove print() from core functionsWladimir J. van der Laan2014-08-201-29/+9
| | | | Break dependency on util.
* Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan2014-07-211-16/+0
| | | | This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
* Fee fixesCozz Lovan2014-07-081-1/+6
|
* Move fee policy out of coreGavin Andresen2014-07-031-1/+1
|
* Relay double-spends, subject to anti-DOSTom Harding2014-06-271-0/+16
| | | | | | | | | | | | | | | | | | | | Allows network wallets and other clients to see transactions that respend a prevout already spent in an unconfirmed transaction in this node's mempool. Knowledge of an attempted double-spend is of interest to recipients of the first spend. In some cases, it will allow these recipients to withhold goods or services upon being alerted of a double-spend that deprives them of payment. As before, respends are not added to the mempool. Anti-Denial-of-Service-Attack provisions: - Use a bloom filter to relay only one respend per mempool prevout - Rate-limit respend relays to a default of 100 thousand bytes/minute - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered - Do not relay these equivalent transactions Remove an unused variable declaration in txmempool.cpp.
* Add CMutableTransaction and make CTransaction immutable.Pieter Wuille2014-06-211-1/+24
| | | | | In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
* Type-safe CFeeRate classGavin Andresen2014-06-061-0/+19
| | | | | | | | Use CFeeRate instead of an int64_t for quantities that are fee-per-size. Helps prevent unit-conversion mismatches between the wallet, relaying, and mining code.
* remove CTransaction::IsNewerThan which is never usedKamil Domanski2014-05-201-29/+0
|
* Remove dummy PRIszX macros for formattingWladimir J. van der Laan2014-05-061-2/+2
| | | | | | | | | Size specifiers are no longer needed now that we use typesafe tinyformat for string formatting, instead of the system's sprintf. No functional changes. This continues the work in #3735.
* Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-13/+13
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-0/+19
| | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen2013-11-301-0/+12
| | | | GetValueIn makes more sense as a CTransaction member.
* core: remove includes in .cpp, if header is already in .hPhilip Kaufmann2013-11-151-2/+0
| | | | | - example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
* Move CCoins-related logic to coins.{cpp.h}Pieter Wuille2013-11-101-43/+0
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+8
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Show short scriptPubKeys correctlyPeter Todd2013-10-241-2/+0
| | | | | | | Previously bitcoin-qt's -debug transaction info was showing CTxOut([error]) It is valid for a scriptPubKey to be any size, for example simply OP_RETURN is valid and can be used to destroy a TXOUT to mining fees.
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-9/+9
|
* Move core implementations to core.cppPieter Wuille2013-06-251-0/+294
|
* Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo2013-06-051-1/+2
| | | | | | | | | | | | | | | | | the mempool instance. Removed AreInputsStandard from CTransaction, made it a regular function in main. Moved CTransaction::GetOutputFor to CCoinsViewCache. Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main. Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache. Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main. Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core. Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
* Created core.h/core.cpp, added to makefiles. Started moving core structures ↵Eric Lombrozo2013-06-051-0/+6
from main to core beginning with COutPoint.