Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
8 years ago
Matt Corallo
e736772c56
Move network-msg-processing code out of main to its own file
8 years ago
Matt Corallo
2c8c57e72f
Document cs_main status when calling into PNB or PNBH
8 years ago
Matt Corallo
047ea1052d
Make fImporting an std::atomic
8 years ago
Matt Corallo
4a6b1f36b7
Expose AcceptBlockHeader through main.h
8 years ago
Matt Corallo
d2b88f97a1
Move orphan-conflict removal from main logic into a callback
...
This makes the orphan map a part of net-processing logic instead
of main logic.
8 years ago
MarcoFalke
fa7cc5a508
Set DEFAULT_LIMITFREERELAY = 0 kB/minute
8 years ago
Matt Corallo
eecffe50ef
Remove redundant duplicate-input check from CheckTransaction
8 years ago
Matt Corallo
ae22357607
Replace CValidationState param in ProcessNewBlock with BlockChecked
8 years ago
Matt Corallo
7c98ce584e
Remove pfrom parameter from ProcessNewBlock
...
This further decouples ProcessNewBlock from networking/peer logic.
8 years ago
Suhas Daftuar
88c35491ab
Fix compact block handling to not ban if block is invalid
8 years ago
Matt Corallo
d6ea737be1
Remove network state wipe from UnloadBlockIndex.
...
UnloadBlockIndex is only used during init if we end up reindexing
to clear our block state so that we can start over. However, at
that time no connections have been brought up as CConnman hasn't
been started yet, so all of the network processing state logic is
empty when its called.
Additionally, the initialization of the recentRejects set is moved
to InitPeerLogic.
8 years ago
Pieter Wuille
3f78562df5
Add DumpMempool and LoadMempool
8 years ago
Pieter Wuille
ced7c949e8
Add AcceptToMemoryPoolWithTime function
8 years ago
Geoffrey Tsui
d0b01f3a85
Explicitly pass const CChainParams& to LoadBlockIndexDB()
8 years ago
mruddy
fc146095d2
RPC: augment getblockchaininfo bip9_softforks data
8 years ago
Pieter Wuille
3ac6de0a04
Align constant names for maximum compact block / blocktxn depth
8 years ago
Matt Corallo
a9aec5c24d
Use BlockChecked signal to send reject messages from mapBlockSource
8 years ago
Matt Corallo
f5efa28393
Remove CConnman parameter from ProcessNewBlock/ActivateBestChain
8 years ago
Matt Corallo
fef1010199
Use CValidationInterface from chain logic to notify peer logic
...
This adds a new CValidationInterface subclass, defined in main.h,
to receive notifications of UpdatedBlockTip and use that to push
blocks to peers, instead of doing it directly from
ActivateBestChain.
8 years ago
Matt Corallo
aefcb7b70c
Move net-processing logic definitions together in main.h
8 years ago
Cory Fields
8d58c4d81f
net: Pass CConnman around as needed
8 years ago
Pieter Wuille
4424af5190
Predeclare PrecomputedTransactionData as sturct
8 years ago
Pieter Wuille
203f2121be
Reduce default number of blocks to check at startup
8 years ago
Pieter Wuille
5127c4f21c
Add preciousblock RPC
...
Includes a bugfix by Luke-Jr.
8 years ago
Pieter Wuille
35fe0393f2
Rename to PrecomputedTransactionData
8 years ago
Pieter Wuille
d2c5d044d0
Precompute sighashes
...
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
8 years ago
leijurv
1aacfc2da5
various typos
8 years ago
Jorge Timón
a6cc299541
Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
8 years ago
Jorge Timón
c8664eeac7
Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock
8 years ago
Pieter Wuille
ab942c15bd
Treat high-sigop transactions as larger rather than rejecting them
8 years ago
Suhas Daftuar
2c06bae39e
Rename "block cost" to "block weight"
8 years ago
Jorge Timón
6f3d616dc8
Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock
8 years ago
Suhas Daftuar
96fa95361f
Improve handling of unconnecting headers
...
When processing a headers message that looks like a block announcement,
send peer a getheaders if the headers message won't connect.
Apply DoS points after too many consecutive unconnecting headers messages.
8 years ago
Jonas Nick
fdb43df23e
[qa] Add GetTransactionSigOpCost unit tests
9 years ago
Pieter Wuille
6032f6930a
Add rewind logic to deal with post-fork software updates
...
Includes logic for dealing with pruning by Suhas Daftuar.
9 years ago
Pieter Wuille
2b1f6f9ccf
BIP141: Other consensus critical limits, and BIP145
...
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
9 years ago
Pieter Wuille
0ef1dd3e11
Refactor script validation to observe amounts
...
This is a preparation for BIP143 support.
9 years ago
Pieter Wuille
8b49040854
BIP141: Commitment structure and deployment
...
Includes a fix by Suhas Daftuar and LongShao007
9 years ago
Matt Corallo
cbda71cf04
Move context-required checks from CheckBlockHeader to Contextual...
9 years ago
Gregory Maxwell
5d0ca81f74
Add recently accepted blocks and txn to AttemptToEvictConnection.
...
This protects any not-already-protected peers who were the most
recent four to relay transactions and most recent four to send
blocks to us.
9 years ago
Gregory Maxwell
11cc143895
Adds an expiration time for orphan tx.
...
This prevents higher order orphans and other junk from
holding positions in the orphan map. Parents delayed
twenty minutes are more are unlikely to ever arrive.
The freed space will improve the orphan matching success rate for
other transactions.
9 years ago
BtcDrak
ab8be98fdb
Remove bad chain alert partition check
...
As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts
The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if 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
Jorge Timón
ee9f4a5b15
Consensus: Decouple from chainparams.o and timedata.o
...
Do it for the consensus-critical functions:
- CheckBlockHeader
- CheckBlock
- ContextualCheckBlockHeader
9 years ago
Pieter Wuille
d253ec4baa
Make ProcessNewBlock dbp const and update comment
9 years ago
Gregory Maxwell
d87b198b73
Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool.
9 years ago
instagibbs
657e07efa3
Rename ReconsiderBlock func to reflect real behavior
9 years ago
instagibbs
addb9d2a09
Remove state arg from ReconsiderBlock
9 years ago
21E14
c8b92486c4
Remove obsolete reference to CValidationState from UpdateCoins.
9 years ago