aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge #7459: Consensus: Decouple pow.o from util.oWladimir J. van der Laan2016-02-051-2/+3
|\ | | | | | | f3757a0 Consensus: Decouple pow.cpp from util.h (Jorge Timón)
| * Consensus: Decouple pow.cpp from util.hJorge Timón2016-02-041-2/+3
| |
* | Merge #6480: include the chaintip blockindex in the SyncTransaction signal, ↵Wladimir J. van der Laan2016-02-041-4/+4
|\ \ | | | | | | | | | | | | | | | add signal UpdateTip() 7d0bf0b include the chaintip *blockIndex in the SyncTransaction signal (Jonas Schnelli)
| * | include the chaintip *blockIndex in the SyncTransaction signalJonas Schnelli2015-12-041-4/+4
| | | | | | | | | | | | | | | - allows reducing of calls to main.cpp for getting the chaintip during transaction syncing - potentially allows reducing of cs_main locks
* | | Merge #7070: Move maxTxFee out of mempoolWladimir J. van der Laan2016-02-041-6/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | fad6244 ATMP: make nAbsurdFee const (MarcoFalke) fa762d0 [wallet.h] Remove main.h include (MarcoFalke) fa79db2 Move maxTxFee out of mempool (MarcoFalke)
| * | | ATMP: make nAbsurdFee constMarcoFalke2016-02-031-2/+2
| | | |
| * | | Move maxTxFee out of mempoolMarcoFalke2016-02-021-5/+5
| | |/ | |/| | | | | | | Also, remove default values in CMerkleTx::AcceptToMemoryPool()
* | | Merge #7225: Eliminate unnecessary call to CheckBlockWladimir J. van der Laan2016-02-031-6/+0
|\ \ \ | | | | | | | | | | | | dbb89dc Eliminate unnecessary call to CheckBlock (Suhas Daftuar)
| * | | Eliminate unnecessary call to CheckBlockSuhas Daftuar2016-02-011-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessNewBlock would return failure early if CheckBlock failed, before calling AcceptBlock. AcceptBlock also calls CheckBlock, and upon failure would update mapBlockIndex to indicate that a block was failed. By returning early in ProcessNewBlock, we were not marking blocks that fail a check in CheckBlock as permanently failed, and thus would continue to re-request and reprocess them.
* | | | Merge #7431: Rename permitrbf to mempoolreplacement and provide minimal ↵Wladimir J. van der Laan2016-02-031-2/+2
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | string-list forward compatibility (needs 0.12 backport) b922fbe Rename replacebyfee=opt-in to mempoolreplacement=fee (Luke Dashjr) 3b66e54 Simplify check for replacebyfee=opt-in (Luke Dashjr) d65dee9 Accept replacebyfee=opt-in for turning on opt-in RBF (Luke Dashjr) 77b55a0 Rename permitrbf to replacebyfee (Luke Dashjr)
| * | | Rename permitrbf to replacebyfeeLuke Dashjr2016-01-281-2/+2
| | | | | | | | | | | | | | | | "permit" is currently used to configure transaction filtering, whereas replacement is more to do with the memory pool state than the transaction itself.
* | | | Merge #7084: mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFeeWladimir J. van der Laan2016-02-021-5/+3
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | fa1193e [doxygen] Actually display comment (MarcoFalke) fa331db mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee (MarcoFalke)
| * | | mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFeeMarcoFalke2016-01-301-5/+3
| | | |
* | | | Merge #7439: Add whitelistforcerelay to control forced relaying. [#7099 redux]Wladimir J. van der Laan2016-02-011-5/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 89d113e Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. (Gregory Maxwell) 325c725 Add whitelistforcerelay to control forced relaying. (Gregory Maxwell)
| * | | | Add whitelistforcerelay to control forced relaying.Gregory Maxwell2016-01-281-5/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also renames whitelistalwaysrelay. Nodes relay all transactions from whitelisted peers, this gets in the way of some useful reasons for whitelisting peers-- for example, bypassing bandwidth limitations. The purpose of this forced relaying is for specialized gateway applications where a node is being used as a P2P connection filter and multiplexer, but where you don't want it getting in the way of (re-)broadcast. This change makes it configurable with whitelistforcerelay.
* | | | Merge #7287: Consensus: Remove calls to error() and FormatStateMessage()Wladimir J. van der Laan2016-02-011-51/+32
|\ \ \ \ | |_|/ / |/| | | | | | | 93fc58c Consensus: Remove calls to error() and FormatStateMessage() from some consensus code in main (Jorge Timón)
| * | | Consensus: Remove calls to error() and FormatStateMessage() from some ↵Jorge Timón2016-01-291-51/+32
| | | | | | | | | | | | | | | | consensus code in main
* | | | Merge #6842: limitfreerelay edge case bugfixWladimir J. van der Laan2016-01-291-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | 2dfeaa1 limitfreerelay edge case bugfix: (ptschip)
| * | | limitfreerelay edge case bugfix:ptschip2016-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a new transaction will cause limitfreerelay to be exceeded it should not be accepted into the memory pool and the byte counter should be updated only after the fact.
* | | | Merge #7056: Save last db readWladimir J. van der Laan2016-01-221-10/+2
|\ \ \ \ | | | | | | | | | | | | | | | 8504867 Save the last unnecessary database read (Alex Morcos)
| * | | | Save the last unnecessary database readAlex Morcos2015-11-181-10/+2
| | | | | | | | | | | | | | | | | | | | It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent. This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.
* | | | | Add option `-permitrbf` to set transaction replacement policyWladimir J. van der Laan2016-01-211-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a configuration option `-permitrbf` to set transaction replacement policy for the mempool. Enabling it will enable (opt-in) RBF, disabling it will refuse all conflicting transactions.
* | | | | Merge pull request #7281: Improve CheckInputs() comment about sig verificationWladimir J. van der Laan2016-01-191-3/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | fd83615 Improve CheckInputs() comment about sig verification (Peter Todd)
| * | | | | Improve CheckInputs() comment about sig verificationPeter Todd2016-01-031-3/+6
| | | | | |
* | | | | | Merge pull request #7164: Do not download transactions during initial ↵Wladimir J. van der Laan2016-01-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blockchain sync 39a525c Do not download transactions during inital sync (ptschip)
| * | | | | | Do not download transactions during inital syncptschip2015-12-151-1/+1
| | |_|/ / / | |/| | | |
* | | | | | Merge pull request #7208Wladimir J. van der Laan2016-01-181-1/+4
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | 64360f1 Make max tip age an option instead of chainparam (Wladimir J. van der Laan)
| * | | | | Make max tip age an option instead of chainparamWladimir J. van der Laan2015-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After discussion in #7164 I think this is better. Max tip age was introduced in #5987 to make it possible to run testnet-in-a-box. But associating this behavior with the testnet chain is wrong conceptually, as it is not needed in normal usage. Should aim to make testnet test the software as-is. Replace it with a (debug) option `-maxtipage`, which can be specified only in the specific case.
* | | | | | Merge pull request #7081Wladimir J. van der Laan2016-01-091-8/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 45b8e27 -bytespersigop option to additionally limit sigops in transactions we relay and mine (Luke Dashjr)
| * \ \ \ \ \ Merge branch bytespersigopLuke Dashjr2016-01-091-8/+10
| |\ \ \ \ \ \
| | * | | | | | -bytespersigop option to additionally limit sigops in transactions we relay ↵Luke Dashjr2015-12-011-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and mine
* | | | | | | | Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
| * | | | | | | | Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| | | | | | | | |
* | | | | | | | | Merge pull request #7217Wladimir J. van der Laan2016-01-051-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5246180 Mark blocks with too many sigops as failed (Suhas Daftuar)
| * | | | | | | | | Mark blocks with too many sigops as failedSuhas Daftuar2015-12-151-1/+1
| | |_|_|_|/ / / / | |/| | | | | | |
* | | | | | | | | Merge pull request #7263Wladimir J. van der Laan2016-01-041-2/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5a0831 Double semicolon cleanup. (21E14)
| * | | | | | | | | Double semicolon cleanup.21E142015-12-301-2/+2
| | |_|_|_|_|/ / / | |/| | | | | | |
* / | | | | | | | Report non-mandatory script failures correctlyPieter Wuille2016-01-031-2/+2
|/ / / / / / / /
* | | | | | | | Merge pull request #7062Wladimir J. van der Laan2015-12-211-42/+15
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | / / / / / | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | 901b01d Remove GetMinRelayFee (Suhas Daftuar) 27fae34 Use fee deltas for determining mempool acceptance (Suhas Daftuar) 9ef2a25 Update replace-by-fee logic to use fee deltas (Suhas Daftuar) eb30666 Fix mempool limiting for PrioritiseTransaction (Suhas Daftuar)
| * | | | | | Remove GetMinRelayFeeSuhas Daftuar2015-12-021-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One test in AcceptToMemoryPool was to compare a transaction's fee agains the value returned by GetMinRelayFee. This value was zero for all small transactions. For larger transactions (between DEFAULT_BLOCK_PRIORITY_SIZE and MAX_STANDARD_TX_SIZE), this function was preventing low fee transactions from ever being accepted. With this function removed, we will now allow transactions in that range with fees (including modifications via PrioritiseTransaction) below the minRelayTxFee, provided that they have sufficient priority.
| * | | | | | Use fee deltas for determining mempool acceptanceSuhas Daftuar2015-12-021-7/+11
| | | | | | |
| * | | | | | Update replace-by-fee logic to use fee deltasSuhas Daftuar2015-12-021-7/+11
| |/ / / / /
* | | / / / Replace trickle nodes with per-node/message Poisson delaysPieter Wuille2015-12-111-20/+14
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have a trickle node, a node which was chosen in each iteration of the send loop that was privileged and allowed to send out queued up non-time critical messages. Since the removal of the fixed sleeps in the network code, this resulted in fast and attackable treatment of such broadcasts. This pull request changes the 3 remaining trickle use cases by random delays: * Local address broadcast (while also removing the the wiping of the seen filter) * Address relay * Inv relay (for transactions; blocks are always relayed immediately) The code is based on older commits by Patrick Strateman.
* | | | | net: Add and document network messages in protocol.hWladimir J. van der Laan2015-12-101-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoids string typos (by making the compiler check) - Makes it easier to grep for handling/generation of a certain message type - Refer directly to documentation by following the symbol in IDE - Move list of valid message types to protocol.cpp: protocol.cpp is a more appropriate place for this, and having the array there makes it easier to keep things consistent.
* | | | | net: Fix sent reject messages for blocks and transactionsWladimir J. van der Laan2015-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Ever since we #5913 have been sending invalid reject messages for transactions and blocks.
* | | | | Don't do mempool lookups for "mempool" command without a filterMatt Corallo2015-12-051-6/+7
| | | | |
* | | | | Disconnect on mempool requests from peers when over the upload limit.Gregory Maxwell2015-12-031-0/+6
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | Mempool requests use a fair amount of bandwidth when the mempool is large, disconnecting peers using them follows the same logic as disconnecting peers fetching historical blocks.
* | | | Merge pull request #7113Wladimir J. van der Laan2015-12-031-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | 086ee67 Switch to a more efficient rolling Bloom filter (Pieter Wuille)
| * | | | Switch to a more efficient rolling Bloom filterPieter Wuille2015-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each 'bit' in the filter we really maintain 2 bits, which store either: 0: not set 1-3: set in generation N After (nElements / 2) insertions, we switch to a new generation, and wipe entries which already had the new generation number, effectively switching from the last 1.5 * nElements set to the last 1.0 * nElements set. This is 25% more space efficient than the previous implementation, and can (at peak) store 1.5 times the requested amount of history (though only 1.0 times the requested history is guaranteed). The existing unit tests should be sufficient.
* | | | | Merge pull request #7133Wladimir J. van der Laan2015-12-031-11/+8
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aa4b0c2 When not filtering blocks, getdata sends more in one test (Pieter Wuille) d41e44c Actually only use filterInventoryKnown with MSG_TX inventory messages. (Gregory Maxwell) b6a0da4 Only use filterInventoryKnown with MSG_TX inventory messages. (Patick Strateman) 6b84935 Rename setInventoryKnown filterInventoryKnown (Patick Strateman) e206724 Remove mruset as it is no longer used. (Gregory Maxwell) ec73ef3 Replace setInventoryKnown with a rolling bloom filter. (Gregory Maxwell)