Make peer=%d log prints consistent #9486
pull TheBlueMatt wants to merge 11 commits into bitcoin:master from TheBlueMatt:2017-01-peer-log-consistency changing 8 files +205 −62-
TheBlueMatt commented at 4:49 pm on January 7, 2017: memberBased on #9375, this changes all the “peer %d"s in net_processing to “peer=%d” which was far more common.
-
Make CBlockIndex*es in net_processing const 80175472d1
-
[qa] Make compact blocks test construction using fetch methods 9a0b2f4c5b
-
[qa] Avoid race in preciousblock test.
If node 0 is sufficiently fast to announce its block to node 1, node 1 might already have the block by the time the node_sync_via_rpc loop gets around to node 1, resulting in the submitblock result "duplicate-inconclusive" as node 1 has the block, but prefers an alternate chain.
-
Call AcceptBlock with the block's shared_ptr instead of CBlock& 180586fd44
-
Add a CValidationInterface::NewPoWValidBlock callback 6987219577
-
Relay compact block messages prior to full block connection c802092142
-
Cache most-recently-announced block's shared_ptr 9eaec08dd2
-
Cache most-recently-connected compact block 5749a853b9
-
Ensure we meet the BIP 152 old-relay-types response requirements
In order to do this, we must call ActivateBestChain prior to responding getdata requests for blocks which we announced using compact blocks. For getheaders responses we dont need code changes, but do note that we must reset the bestHeaderSent so that the SendMessages call re-announces the header in question. While we could do something smarter for getblocks, calling ActivateBestChain is simple and more obviously correct, instead of doing something more similar to getheaders. See-also the BIP clarifications at https://github.com/bitcoin/bips/pull/486
-
Avoid holding cs_most_recent_block while calling ReadBlockFromDisk c1ae4fcf7d
-
MarcoFalke added the label Docs and Output on Jan 7, 2017
-
Make peer id logging consistent ("peer=%d" instead of "peer %d") e6111b2398
-
morcos commented at 7:39 pm on January 9, 2017: memberutACK. Thanks!
-
morcos commented at 7:40 pm on January 9, 2017: memberPlease tag for 0.14
-
fanquake added this to the milestone 0.14.0 on Jan 9, 2017
-
whitemagpie commented at 9:42 am on January 10, 2017: noneMy first review as a noob - please let me know if I am making a mistake. Thanks! utAck 8017547 utAck e6111b2 utAck 180586f utAck 8baaba6 utAck c1ae4fc
-
MarcoFalke commented at 10:33 am on January 10, 2017: member
@whitemagpie This is based on #9375, so you might want to review that first.
On Tue, Jan 10, 2017 at 10:42 AM, Tuhina notifications@github.com wrote:
My first review as a noob - please let me know if I am making a mistake. Thanks! utAck 8017547 utAck e6111b2 utAck 180586f utAck 8baaba6 utAck c1ae4fc
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
-
laanwj commented at 12:51 pm on January 10, 2017: memberConcept ACK
-
in src/validation.cpp: in 80175472d1 outdated
3037 LOCK(cs_main); 3038 for (const CBlockHeader& header : headers) { 3039- if (!AcceptBlockHeader(header, state, chainparams, ppindex)) { 3040+ // cast away the ppindex-returns-const CBlockIndex - we're just assigning it to a CBlockIndex* 3041+ // that we own and is updated non-const anyway 3042+ if (!AcceptBlockHeader(header, state, chainparams, const_cast<CBlockIndex**>(ppindex))) {
jtimon commented at 5:54 pm on January 10, 2017:I’m not sure I understand this. AcceptBlockHeader doesn’t take it as const since it modifies it. Why should ProcessNewBlockHeaders take it as const?jtimon commented at 6:03 pm on January 10, 2017: contributorutACK https://github.com/bitcoin/bitcoin/pull/9486/commits/e6111b2398ca21f0e38333236abb0be7fa48c95f as an indepdent commit, but I still haven’t reviewed #9375 (which contains the rest of the commits). At a fast glance I don’t see why that commit needs to depend on #9375 and couldn’t be trivially merged independently instead thought.TheBlueMatt commented at 6:40 pm on January 10, 2017: memberre: the const_cast, see the original PR, there’s a discussion about it there.
On January 10, 2017 9:54:44 AM PST, “Jorge Timón” notifications@github.com wrote:
jtimon commented on this pull request.
{ { LOCK(cs_main); for (const CBlockHeader& header : headers) {
-
if (!AcceptBlockHeader(header, state, chainparams,
ppindex)) {
-
// cast away the ppindex-returns-const CBlockIndex - we're
just assigning it to a CBlockIndex*
-
// that we own and is updated non-const anyway
-
if (!AcceptBlockHeader(header, state, chainparams,
const_cast<CBlockIndex**>(ppindex))) {
I’m not sure I understand this. AcceptBlockHeader doesn’t take it as const since it modifies it. Why should ProcessNewBlockHeaders take it as const?
– You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/pull/9486#pullrequestreview-15973887
instagibbs commented at 3:22 pm on January 13, 2017: membergrep utACK https://github.com/bitcoin/bitcoin/pull/9486/commits/e6111b2398ca21f0e38333236abb0be7fa48c95f @whitemagpie It’s easier to ACK the “latest” commitment only since commits are hash chainedlaanwj commented at 5:44 am on January 15, 2017: memberutACK e6111b2laanwj merged this on Jan 15, 2017laanwj closed this on Jan 15, 2017
laanwj referenced this in commit f62bc10a60 on Jan 15, 2017codablock referenced this in commit 5db2eaec96 on Feb 7, 2018codablock referenced this in commit 7daefe10f6 on Feb 7, 2018codablock referenced this in commit cef919f182 on Feb 7, 2018gladcow referenced this in commit b26525c841 on Mar 8, 2018gladcow referenced this in commit 43480ef30f on Mar 13, 2018gladcow referenced this in commit 3e76f2dc35 on Mar 14, 2018gladcow referenced this in commit 12d083e64d on Mar 15, 2018gladcow referenced this in commit 14ad1fecdc on Mar 15, 2018gladcow referenced this in commit 07a01daae7 on Mar 15, 2018gladcow referenced this in commit 7e230fec1a on Mar 15, 2018gladcow referenced this in commit e1b0ff93d7 on Mar 24, 2018gladcow referenced this in commit 22553a022c on Apr 4, 2018UdjinM6 referenced this in commit bc45a2f87a on Apr 11, 2018andvgal referenced this in commit da2d909670 on Jan 6, 2019andvgal referenced this in commit fd5c50bc2b on Jan 6, 2019CryptoCentric referenced this in commit dc2ef27d5e on Feb 28, 2019CryptoCentric referenced this in commit dd3fd51204 on Feb 28, 2019CryptoCentric referenced this in commit ad4400172c on Mar 2, 2019DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 06:12 UTC
More mirrored repositories can be found on mirror.b10c.me