Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation: Log FormatStateMessage on ConnectBlock error in ConnectTip #14097

Merged
merged 1 commit into from Aug 29, 2018

Conversation

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Aug 29, 2018

This change additionally logs the validation state on error, which is not logged at all on current master.

Before:

ERROR: ConnectTip(): ConnectBlock ffffff.... failed

After:

ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
@domob1812
Copy link
Contributor

@domob1812 domob1812 commented Aug 29, 2018

utACK fa309dc. Thanks for this, I've been puzzled myself quite a couple of times what the actual issue is when debugging errors like that - very useful!

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Aug 29, 2018

Note to reviewers: This pull request conflicts with the following ones:
  • #9719 (Allow abort of ConnectBlock() when shutdown requested. by rebroad)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Aug 29, 2018

utACK fa309dc

Nice usability improvement by making the error message more meaningful!

@laanwj laanwj merged commit fa309dc into bitcoin:master Aug 29, 2018
2 checks passed
laanwj added a commit that referenced this issue Aug 29, 2018
…r in ConnectTip

fa309dc validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0
@MarcoFalke MarcoFalke deleted the Mf1808-validationLogError branch Aug 29, 2018
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Apr 22, 2020
…r in ConnectTip

Summary:
fa309dc30579acebff33380abdfe728c1cf59f92 validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

Backport of Core [[bitcoin/bitcoin#14097 | PR14097]]

The test change is not part of the original PR because those error paths diverge on ABC vs Core.

Test Plan:
```
ninja check
test_runner.py
```

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5780
ftrader added a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue Aug 17, 2020
…r in ConnectTip

Summary:
fa309dc30579acebff33380abdfe728c1cf59f92 validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

Backport of Core [[bitcoin/bitcoin#14097 | PR14097]]

The test change is not part of the original PR because those error paths diverge on ABC vs Core.

Test Plan:
```
ninja check
test_runner.py
```

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5780
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 30, 2021
…ck error in ConnectTip

fa309dc validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

# Conflicts:
#	src/validation.cpp
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 30, 2021
…ck error in ConnectTip

fa309dc validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

# Conflicts:
#	src/validation.cpp
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 2, 2021
…ck error in ConnectTip

fa309dc validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

# Conflicts:
#	src/validation.cpp
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 2, 2021
…ck error in ConnectTip

fa309dc validation: Log FormatStateMessage on ConnectBlock error in ConnectTip (MarcoFalke)

Pull request description:

  This change additionally logs the validation state on error, which is not logged at all on current master.

  Before:
  ```
  ERROR: ConnectTip(): ConnectBlock ffffff.... failed
  ```

  After:
  ```
  ERROR: ConnectTip: ConnectBlock ffffff.... failed, bad-cb-amount (code 16)
  ```

Tree-SHA512: e69ee0266772b3f77c0193c4a959c2444bf1a51259bd29d790cf665582b037997e520c8567f70b36362c071dcfe1a8ebd7c0f2286cf1b842df5731960e7e1ba0

# Conflicts:
#	src/validation.cpp
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants