mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge bitcoin/bitcoin#29236: log: Nuke error(...)
fa39151394refactor: Remove unused error() (MarcoFalke)fad0335517scripted-diff: Replace error() with LogError() (MarcoFalke)fa808fb749refactor: Make error() return type void (MarcoFalke)fa1d624348scripted-diff: return error(...); ==> error(...); return false; (MarcoFalke)fa9a5e80abrefactor: Add missing {} around error() calls (MarcoFalke) Pull request description: `error(...)` has many issues: * It is often used in the context of `return error(...)`, implying that it has a "fancy" type, creating confusion with `util::Result/Error` * `-logsourcelocations` does not work with it, because it will pretend the error happened inside of `logging.h` * The log line contains `ERROR: `, as opposed to `[error]`, like for other errors logged with `LogError`. Fix all issues by removing it. ACKs for top commit: fjahr: re-utACKfa39151394stickies-v: re-ACKfa39151394, no changes since4a903741b0ryanofsky: Code review ACKfa39151394. Just rebase since last review Tree-SHA512: ec5bb502ab0d3733fdb14a8a00762638fce0417afd8dd6294ae0d485ce2b7ca5b1efeb50fc2cd7467f6c652e4ed3e99b0f283b08aeca04bbfb7ea4f2c95d283a
This commit is contained in:
@@ -570,7 +570,7 @@ void CNode::SetAddrLocal(const CService& addrLocalIn) {
|
||||
AssertLockNotHeld(m_addr_local_mutex);
|
||||
LOCK(m_addr_local_mutex);
|
||||
if (addrLocal.IsValid()) {
|
||||
error("Addr local already set for node: %i. Refusing to change from %s to %s", id, addrLocal.ToStringAddrPort(), addrLocalIn.ToStringAddrPort());
|
||||
LogError("Addr local already set for node: %i. Refusing to change from %s to %s\n", id, addrLocal.ToStringAddrPort(), addrLocalIn.ToStringAddrPort());
|
||||
} else {
|
||||
addrLocal = addrLocalIn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user